From 924a3408fd214f6d97ac829ff8ae6cde8e6a38bb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Hugo=20Beauz=C3=A9e-Luyssen?= Date: Tue, 24 Jan 2012 18:15:41 +0100 Subject: [PATCH] hls: Don't crash if a segment can't be found. Signed-off-by: Jean-Baptiste Kempf --- modules/stream_filter/httplive.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/stream_filter/httplive.c b/modules/stream_filter/httplive.c index e2a8834e88..f573404716 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) -- 2.39.2