summaryrefslogtreecommitdiffstats
path: root/gst/rtpmux/gstrtpdtmfmux.c
diff options
context:
space:
mode:
Diffstat (limited to 'gst/rtpmux/gstrtpdtmfmux.c')
-rw-r--r--gst/rtpmux/gstrtpdtmfmux.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gst/rtpmux/gstrtpdtmfmux.c b/gst/rtpmux/gstrtpdtmfmux.c
index 50fdba48..da10130c 100644
--- a/gst/rtpmux/gstrtpdtmfmux.c
+++ b/gst/rtpmux/gstrtpdtmfmux.c
@@ -90,6 +90,8 @@ static void gst_rtp_dtmf_mux_base_init (gpointer g_class);
static void gst_rtp_dtmf_mux_class_init (GstRTPDTMFMuxClass * klass);
static void gst_rtp_dtmf_mux_dispose (GObject * object);
+static void gst_rtp_mux_release_pad (GstElement * element, GstPad * pad);
+
static gboolean gst_rtp_dtmf_mux_sink_event (GstPad * pad, GstEvent * event);
static GstFlowReturn gst_rtp_dtmf_mux_chain (GstPad * pad, GstBuffer * buffer);
@@ -152,6 +154,7 @@ gst_rtp_dtmf_mux_class_init (GstRTPDTMFMuxClass * klass)
gst_marshal_VOID__OBJECT, G_TYPE_NONE, 1, GST_TYPE_PAD);
gobject_class->dispose = gst_rtp_dtmf_mux_dispose;
+ gstelement_class->release_pad = gst_rtp_mux_release_pad;
gstrtpmux_class->chain_func = gst_rtp_dtmf_mux_chain;
gstrtpmux_class->sink_event_func = gst_rtp_dtmf_mux_sink_event;
}
@@ -319,6 +322,21 @@ gst_rtp_dtmf_mux_sink_event (GstPad * pad, GstEvent * event)
return ret;
}
+static void
+gst_rtp_mux_release_pad (GstElement * element, GstPad * pad)
+{
+ GstRTPDTMFMux *mux = GST_RTP_DTMF_MUX (element);
+
+ GST_OBJECT_LOCK (mux);
+ if (mux->special_pad == pad) {
+ gst_object_unref (mux->special_pad);
+ mux->special_pad = NULL;
+ }
+ GST_OBJECT_UNLOCK (mux);
+
+ GST_CALL_PARENT (GST_ELEMENT_CLASS, release_pad, (element, pad));
+}
+
gboolean
gst_rtp_dtmf_mux_plugin_init (GstPlugin * plugin)
{