parse: Fix a critical when using the : operator.
authorJan Schmidt <jan@centricular.com>
Thu, 1 Jul 2021 15:59:18 +0000 (01:59 +1000)
committerJan Schmidt <jan@centricular.com>
Thu, 1 Jul 2021 15:59:18 +0000 (01:59 +1000)
Fix "has no handler with id" output criticals when the :
multilink operator is used. These were caused by disconnecting
a signal handler multiple times.

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

gst/parse/grammar.y.in

index d4ac581..cf5eb16 100644 (file)
@@ -566,10 +566,11 @@ static void gst_parse_found_pad (GstElement *src, GstPad *pad, gpointer data)
                               link->all_pads ? "all pads" : "one pad",
                           PRETTY_PAD_NAME_ARGS (src, link->src_pad),
                    PRETTY_PAD_NAME_ARGS (link->sink, link->sink_pad));
-    g_signal_handler_disconnect (src, link->no_more_pads_signal_id);
     /* releases 'link' */
-    if (!link->all_pads)
+    if (!link->all_pads) {
+      g_signal_handler_disconnect (src, link->no_more_pads_signal_id);
       g_signal_handler_disconnect (src, link->pad_added_signal_id);
+    }
   }
 }