summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThijs Vermeir <thijsvermeir@gmail.com>2010-06-30 09:12:08 (GMT)
committerThijs Vermeir <thijsvermeir@gmail.com>2010-06-30 10:39:09 (GMT)
commit244a35a2260fd71279d64a6477d585e766ec0160 (patch)
tree1473c9d9b18e269328a83ee660ae63cdb96ce4d9
parentc96f8bd4300c8f884cc1ed45941550eb07aed253 (diff)
rtpptdemux: fix memleak on custom downstream events
by not sending custom downstream event twice and fix memleak when not handling the event https://bugzilla.gnome.org/show_bug.cgi?id=623196
-rw-r--r--gst/rtpmanager/gstrtpptdemux.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gst/rtpmanager/gstrtpptdemux.c b/gst/rtpmanager/gstrtpptdemux.c
index 957ebdb..6b49483 100644
--- a/gst/rtpmanager/gstrtpptdemux.c
+++ b/gst/rtpmanager/gstrtpptdemux.c
@@ -429,7 +429,7 @@ gst_rtp_pt_demux_sink_event (GstPad * pad, GstEvent * event)
GstRtpPtDemux *rtpdemux;
gboolean res = FALSE;
- rtpdemux = GST_RTP_PT_DEMUX (GST_PAD_PARENT (pad));
+ rtpdemux = GST_RTP_PT_DEMUX (gst_pad_get_parent (pad));
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_CUSTOM_DOWNSTREAM:
@@ -444,15 +444,20 @@ gst_rtp_pt_demux_sink_event (GstPad * pad, GstEvent * event)
if (rtpdemuxpad)
res = gst_pad_push_event (rtpdemuxpad->pad, event);
+ else
+ gst_event_unref (event);
} else {
res = gst_pad_event_default (pad, event);
}
+ break;
}
default:
res = gst_pad_event_default (pad, event);
break;
}
+
+ gst_object_unref (rtpdemux);
return res;
}