webrtcdatachannel: Chain to parent class constructed
authorPhilippe Normand <philn@igalia.com>
Mon, 16 May 2022 15:43:57 +0000 (16:43 +0100)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 7 Jun 2022 11:29:32 +0000 (11:29 +0000)
And add a debug log statement.

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

subprojects/gst-plugins-bad/ext/webrtc/webrtcdatachannel.c

index 89fbd7c..0ce3368 100644 (file)
@@ -966,10 +966,15 @@ on_appsrc_data (GstPad * pad, GstPadProbeInfo * info, gpointer user_data)
 static void
 gst_webrtc_data_channel_constructed (GObject * object)
 {
-  WebRTCDataChannel *channel = WEBRTC_DATA_CHANNEL (object);
+  WebRTCDataChannel *channel;
   GstPad *pad;
   GstCaps *caps;
 
+  G_OBJECT_CLASS (parent_class)->constructed (object);
+
+  channel = WEBRTC_DATA_CHANNEL (object);
+  GST_DEBUG ("New channel %p constructed", channel);
+
   caps = gst_caps_new_any ();
 
   channel->appsrc = gst_element_factory_make ("appsrc", NULL);