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

Rui Zhang git at videolan.org
Wed May 23 19:33:40 CEST 2012


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

httplive: do not reset segment data without key

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
(cherry picked from commit 533c3fda8892754017a26d2dfe3ef9d3cbb12dbb)

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

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

 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 ea0a854..58229bd 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