From 7b9547a1192295303ff65bab650f40b7907fb7cd Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Sun, 7 Aug 2022 15:02:26 +1000 Subject: [PATCH] hlsdemux2: Allow starting at the partial_only segment Part-of: --- .../ext/adaptivedemux2/hls/gsthlsdemux.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/gsthlsdemux.c b/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/gsthlsdemux.c index a826fc9f28..d93308d543 100644 --- a/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/gsthlsdemux.c +++ b/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/gsthlsdemux.c @@ -2493,6 +2493,15 @@ gst_hls_demux_stream_update_fragment_info (GstAdaptiveDemux2Stream * stream) hlsdemux_stream->current_segment = gst_hls_media_playlist_get_starting_segment (hlsdemux_stream->playlist); + + if (hlsdemux_stream->current_segment->partial_only) { + /* FIXME: We might find an independent partial segment + * that's still old enough (beyond the part_hold_back threshold) + * but closer to the live edge than the start of the segment */ + hlsdemux_stream->in_partial_segments = TRUE; + hlsdemux_stream->part_idx = 0; + } + } else { if (gst_hls_media_playlist_has_lost_sync (hlsdemux_stream->playlist, stream->current_position)) {