[vlc-commits] hls: Don't crash if a segment can't be found.

Hugo Beauzée-Luyssen git at videolan.org
Tue Jan 24 19:03:35 CET 2012


vlc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Tue Jan 24 18:15:41 2012 +0100| [924a3408fd214f6d97ac829ff8ae6cde8e6a38bb] | committer: Jean-Baptiste Kempf

hls: Don't crash if a segment can't be found.

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

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

 modules/stream_filter/httplive.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/modules/stream_filter/httplive.c b/modules/stream_filter/httplive.c
index e2a8834..f573404 100644
--- a/modules/stream_filter/httplive.c
+++ b/modules/stream_filter/httplive.c
@@ -1196,6 +1196,8 @@ static int hls_ManageSegmentKeys(stream_t *s, hls_stream_t *hls)
     {
         prev_seg = seg;
         seg = segment_GetSegment(hls, i);
+        if (seg == NULL )
+            continue;
         if (seg->psz_key_path == NULL)
             continue;   /* No key to load ? continue */
         if (seg->b_key_loaded)



More information about the vlc-commits mailing list