summaryrefslogtreecommitdiff
path: root/ext/srtp
diff options
context:
space:
mode:
authorAleix Conchillo Flaqué <aleix@oblong.com>2014-11-20 10:23:30 -0800
committerOlivier Crête <olivier.crete@collabora.com>2014-11-20 13:32:39 -0500
commit086cc58952ac1d98236da503ad08979f844ce8d0 (patch)
tree62553461772537db307cdd11f4fff33db646ddbe /ext/srtp
parentd800ac023b07fc49b87e8c1a3b3c480d9ef8c6f8 (diff)
downloadgstreamer-plugins-bad-086cc58952ac1d98236da503ad08979f844ce8d0.tar.gz
srtpdec: fix rtp/rtcp sink event memory leak
https://bugzilla.gnome.org/show_bug.cgi?id=740451
Diffstat (limited to 'ext/srtp')
-rw-r--r--ext/srtp/gstsrtpdec.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/ext/srtp/gstsrtpdec.c b/ext/srtp/gstsrtpdec.c
index 2caa57c32..debff15d1 100644
--- a/ext/srtp/gstsrtpdec.c
+++ b/ext/srtp/gstsrtpdec.c
@@ -757,13 +757,16 @@ gst_srtp_dec_sink_setcaps (GstPad * pad, GstObject * parent,
static gboolean
gst_srtp_dec_sink_event_rtp (GstPad * pad, GstObject * parent, GstEvent * event)
{
+ gboolean ret;
GstCaps *caps;
GstSrtpDec *filter = GST_SRTP_DEC (parent);
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_CAPS:
gst_event_parse_caps (event, &caps);
- return gst_srtp_dec_sink_setcaps (pad, parent, caps, FALSE);
+ ret = gst_srtp_dec_sink_setcaps (pad, parent, caps, FALSE);
+ gst_event_unref (event);
+ return ret;
case GST_EVENT_SEGMENT:
filter->rtp_has_segment = TRUE;
break;
@@ -781,13 +784,16 @@ static gboolean
gst_srtp_dec_sink_event_rtcp (GstPad * pad, GstObject * parent,
GstEvent * event)
{
+ gboolean ret;
GstCaps *caps;
GstSrtpDec *filter = GST_SRTP_DEC (parent);
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_CAPS:
gst_event_parse_caps (event, &caps);
- return gst_srtp_dec_sink_setcaps (pad, parent, caps, TRUE);
+ ret = gst_srtp_dec_sink_setcaps (pad, parent, caps, TRUE);
+ gst_event_unref (event);
+ return ret;
case GST_EVENT_SEGMENT:
filter->rtcp_has_segment = TRUE;
break;