mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 06:46:38 +00:00
hlsdemux2: Ignore partial segments when not live
Add some checks that LL-HLS support is enabled and that the current playlist is live before proceeding to play any partial segments. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
This commit is contained in:
parent
401ca3ef44
commit
61516eadf6
1 changed files with 5 additions and 2 deletions
|
@ -528,7 +528,8 @@ gst_hls_demux_stream_seek (GstAdaptiveDemux2Stream * stream, gboolean forward,
|
|||
}
|
||||
|
||||
/* Allow jumping to partial segments in the last 2 segments in LL-HLS */
|
||||
if (hls_stream->llhls_enabled)
|
||||
if (hls_stream->llhls_enabled
|
||||
&& GST_HLS_MEDIA_PLAYLIST_IS_LIVE (hls_stream->playlist))
|
||||
flags |= GST_HLS_M3U8_SEEK_FLAG_ALLOW_PARTIAL;
|
||||
|
||||
GstM3U8SeekResult seek_result;
|
||||
|
@ -1950,7 +1951,9 @@ gst_hls_demux_stream_advance_fragment (GstAdaptiveDemux2Stream * stream)
|
|||
hlsdemux_stream->current_segment = new_segment;
|
||||
|
||||
/* In LL-HLS, handle advancing into the partial-only segment */
|
||||
if (new_segment->partial_only) {
|
||||
if (hlsdemux_stream->llhls_enabled
|
||||
&& GST_HLS_MEDIA_PLAYLIST_IS_LIVE (hlsdemux_stream->playlist)
|
||||
&& new_segment->partial_only) {
|
||||
hlsdemux_stream->in_partial_segments = TRUE;
|
||||
hlsdemux_stream->part_idx = 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue