hlsdemux2: Fix crash on live playlist with single entry
authorEdward Hervey <edward@centricular.com>
Wed, 14 Sep 2022 08:15:41 +0000 (10:15 +0200)
committerTim-Philipp Müller <tim@centricular.com>
Wed, 14 Sep 2022 14:14:08 +0000 (15:14 +0100)
commit124f93a05d0e9578c0c324b1dadffbc8519930b9
tree7eeedbc9d21667bce212c8eb7dbec59b8d1dc82c
parentc91d72e6775dc11ade653b232a5a5b51aa48d5c0
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>
subprojects/gst-plugins-good/ext/adaptivedemux2/hls/m3u8.c