hlsdemux2: Only seek on selected streams
authorEdward Hervey <edward@centricular.com>
Wed, 8 Jun 2022 09:16:15 +0000 (11:16 +0200)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 28 Jun 2022 17:59:24 +0000 (17:59 +0000)
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>

subprojects/gst-plugins-good/ext/adaptivedemux2/hls/gsthlsdemux.c

index e21264c..1db3271 100644 (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");