Commit 924a3408 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen Committed by Jean-Baptiste Kempf

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

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent c51ff47e
...@@ -1196,6 +1196,8 @@ static int hls_ManageSegmentKeys(stream_t *s, hls_stream_t *hls) ...@@ -1196,6 +1196,8 @@ static int hls_ManageSegmentKeys(stream_t *s, hls_stream_t *hls)
{ {
prev_seg = seg; prev_seg = seg;
seg = segment_GetSegment(hls, i); seg = segment_GetSegment(hls, i);
if (seg == NULL )
continue;
if (seg->psz_key_path == NULL) if (seg->psz_key_path == NULL)
continue; /* No key to load ? continue */ continue; /* No key to load ? continue */
if (seg->b_key_loaded) if (seg->b_key_loaded)
......
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