Commit f4f5913e 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>
(cherry picked from commit 533c3fda8892754017a26d2dfe3ef9d3cbb12dbb)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent b89e0273
......@@ -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