From d41def562c370bca73f7f6a4da1129dbf1e72372 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Fri, 18 Nov 2022 01:18:48 +1100 Subject: [PATCH] hlsdemux2: Use stream llhls_enabled flag Use the stream's copy of the llhls_enabled flag when deciding whether to do preload requests - the value that was cached when the stream started Part-of: --- .../ext/adaptivedemux2/hls/gsthlsdemux-stream.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/gsthlsdemux-stream.c b/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/gsthlsdemux-stream.c index 34d86ea3e6..a2150b2552 100644 --- a/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/gsthlsdemux-stream.c +++ b/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/gsthlsdemux-stream.c @@ -1309,11 +1309,7 @@ static void gst_hls_demux_stream_update_preloads (GstHLSDemuxStream * hlsdemux_stream) { GstHLSMediaPlaylist *playlist = hlsdemux_stream->playlist; - GstAdaptiveDemux *demux = - GST_ADAPTIVE_DEMUX2_STREAM_CAST (hlsdemux_stream)->demux; - GstHLSDemux *hlsdemux = GST_HLS_DEMUX_CAST (demux); - - gboolean preloads_allowed = hlsdemux->llhls_enabled + gboolean preloads_allowed = hlsdemux_stream->llhls_enabled && GST_HLS_MEDIA_PLAYLIST_IS_LIVE (playlist); if (playlist->preload_hints == NULL || !preloads_allowed) {