mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-02 05:28:48 +00:00
hlsdemux2: Fix crash on live playlist with single entry
If there is a single entry, we would end up computing a minimum distance of 0, and would therefore read entries from after the segment array Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3024>
This commit is contained in:
parent
c91d72e677
commit
124f93a05d
1 changed files with 1 additions and 1 deletions
|
@ -1459,7 +1459,7 @@ gst_hls_media_playlist_get_seek_range (GstHLSMediaPlaylist * m3u8,
|
||||||
first = g_ptr_array_index (m3u8->segments, 0);
|
first = g_ptr_array_index (m3u8->segments, 0);
|
||||||
*start = first->stream_time;
|
*start = first->stream_time;
|
||||||
|
|
||||||
if (GST_HLS_MEDIA_PLAYLIST_IS_LIVE (m3u8)) {
|
if (GST_HLS_MEDIA_PLAYLIST_IS_LIVE (m3u8) && m3u8->segments->len > 1) {
|
||||||
/* min_distance is used to make sure the seek range is never closer than
|
/* min_distance is used to make sure the seek range is never closer than
|
||||||
GST_M3U8_LIVE_MIN_FRAGMENT_DISTANCE fragments from the end of a live
|
GST_M3U8_LIVE_MIN_FRAGMENT_DISTANCE fragments from the end of a live
|
||||||
playlist - see 6.3.3. "Playing the Playlist file" of the HLS draft */
|
playlist - see 6.3.3. "Playing the Playlist file" of the HLS draft */
|
||||||
|
|
Loading…
Reference in a new issue