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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2679>
This commit is contained in:
Edward Hervey 2022-06-08 11:16:15 +02:00 committed by GStreamer Marge Bot
parent 787dbfd4e4
commit 0a658840da

View file

@ -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,
&current_pos) != GST_FLOW_OK) {
GST_ERROR_OBJECT (stream, "Failed to seek on stream");