From 0a658840da1b1e31eed7841fb22ab9edc647876e Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Wed, 8 Jun 2022 11:16:15 +0200 Subject: [PATCH] hlsdemux2: Only seek on selected streams When handling seeks, there is no need to seek on unselected streams. If they later get activated they will be properly seek onto Part-of: --- .../gst-plugins-good/ext/adaptivedemux2/hls/gsthlsdemux.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/gsthlsdemux.c b/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/gsthlsdemux.c index e21264cbde..1db3271d34 100644 --- a/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/gsthlsdemux.c +++ b/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/gsthlsdemux.c @@ -449,6 +449,10 @@ gst_hls_demux_seek (GstAdaptiveDemux * demux, GstEvent * seek) GstAdaptiveDemux2Stream *stream = GST_ADAPTIVE_DEMUX2_STREAM_CAST (walk->data); + /* Only seek on selected streams */ + if (!gst_adaptive_demux2_stream_is_selected (stream)) + continue; + if (gst_hls_demux_stream_seek (stream, rate >= 0, flags, target_pos, ¤t_pos) != GST_FLOW_OK) { GST_ERROR_OBJECT (stream, "Failed to seek on stream");