mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-02 08:42:32 +00:00
hlsdemux2: Avoid assert in _has_next_fragment()
gst_hls_demux_stream_has_next_fragment() can be called with a NULL current_segment if we're past the end of the current playlist. In that case, just return FALSE instead of hitting a critical in the playlist code. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
This commit is contained in:
parent
018a6192bd
commit
21cb739830
1 changed files with 3 additions and 0 deletions
|
@ -1096,6 +1096,9 @@ gst_hls_demux_stream_has_next_fragment (GstAdaptiveDemux2Stream * stream)
|
|||
|
||||
GST_DEBUG_OBJECT (stream, "has next ?");
|
||||
|
||||
if (hls_stream->current_segment == NULL)
|
||||
return FALSE;
|
||||
|
||||
return gst_hls_media_playlist_has_next_fragment (hls_stream->playlist,
|
||||
hls_stream->current_segment, stream->demux->segment.rate > 0);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue