Commit 533c3fda authored by Rui Zhang's avatar Rui Zhang Committed by Jean-Baptiste Kempf

httplive: do not reset segment data without key

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 61205e15
......@@ -1317,7 +1317,8 @@ static int hls_UpdatePlaylist(stream_t *s, hls_stream_t *hls_new, hls_stream_t *
continue;
}
/* We must free the content, because if the key was not downloaded, content can't be decrypted */
if (segment->data)
if ((p->psz_key_path || p->b_key_loaded) &&
segment->data)
{
block_Release(segment->data);
segment->data = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment