hlsdemux2: Allow starting at the partial_only segment

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
This commit is contained in:
Jan Schmidt 2022-08-07 15:02:26 +10:00 committed by GStreamer Marge Bot
parent 1b8af98208
commit 7b9547a119

View file

@ -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)) {