[vlc-commits] httplive: do not reset segment data without key

Rui Zhang git at videolan.org
Mon May 21 16:52:26 CEST 2012


vlc | branch: master | Rui Zhang <bbcallen at gmail.com> | Fri May 18 21:17:32 2012 +0800| [533c3fda8892754017a26d2dfe3ef9d3cbb12dbb] | committer: Jean-Baptiste Kempf

httplive: do not reset segment data without key

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=533c3fda8892754017a26d2dfe3ef9d3cbb12dbb
---

 modules/stream_filter/httplive.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/stream_filter/httplive.c b/modules/stream_filter/httplive.c
index 433dca0..86f97b6 100644
--- a/modules/stream_filter/httplive.c
+++ b/modules/stream_filter/httplive.c
@@ -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;



More information about the vlc-commits mailing list