diff options
Diffstat (limited to 'ext/srtp')
-rw-r--r-- | ext/srtp/gstsrtpdec.c | 10 |
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; |