concat: fix qos event handling
authorGuillaume Desmottes <guillaume.desmottes@onestream.live>
Wed, 20 Oct 2021 09:20:13 +0000 (11:20 +0200)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 20 Oct 2021 13:39:03 +0000 (13:39 +0000)
We were shadowing the sinkpad variable resulting in:
- the QoS event to be send to all sink pads instead of the active one
- the pad to be leaked

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1208>

subprojects/gstreamer/plugins/elements/gstconcat.c

index 35f68eb..22aaa20 100644 (file)
@@ -758,14 +758,11 @@ gst_concat_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
       break;
     }
     case GST_EVENT_QOS:{
-      GstPad *sinkpad = NULL;
-
       g_mutex_lock (&self->lock);
       if ((sinkpad = self->current_sinkpad))
         gst_object_ref (sinkpad);
       g_mutex_unlock (&self->lock);
 
-
       if (!sinkpad) {
         gst_event_replace (&event, NULL);
         ret = FALSE;