diff --git a/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/m3u8.c b/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/m3u8.c index f976b2fb6d..0b8bf165d9 100644 --- a/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/m3u8.c +++ b/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/m3u8.c @@ -1124,8 +1124,8 @@ gst_hls_media_playlist_get_starting_segment (GstHLSMediaPlaylist * self) /* Live playlist */ res = g_ptr_array_index (self->segments, - MAX ((gint) self->segments->len - GST_M3U8_LIVE_MIN_FRAGMENT_DISTANCE, - 0)); + MAX ((gint) self->segments->len - GST_M3U8_LIVE_MIN_FRAGMENT_DISTANCE - + 1, 0)); } if (res) {