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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
This commit is contained in:
Jan Schmidt 2022-11-18 01:18:48 +11:00 committed by GStreamer Marge Bot
parent 42b0dd8c41
commit d41def562c

View file

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