diff options
author | Garima Gaur <garima.g@samsung.com> | 2016-12-01 15:06:06 +0530 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2016-12-01 13:04:03 +0200 |
commit | 50e7096a86ea120ca4b5b42294a8d80433803cc6 (patch) | |
tree | c4972e7b3b23de6a2d033298395b344efe18ecb7 | |
parent | f8bf3a84efaa660296678ee79351a9fa48998dc7 (diff) |
rtp: Fix some memory leaks in usage of gst_pad_get_current_caps()
https://bugzilla.gnome.org/show_bug.cgi?id=775071
-rw-r--r-- | gst/rtp/gstrtph264depay.c | 1 | ||||
-rw-r--r-- | gst/rtp/gstrtpsbcdepay.c | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/gst/rtp/gstrtph264depay.c b/gst/rtp/gstrtph264depay.c index 056724c67..ff5415c26 100644 --- a/gst/rtp/gstrtph264depay.c +++ b/gst/rtp/gstrtph264depay.c @@ -432,6 +432,7 @@ gst_rtp_h264_set_src_caps (GstRtpH264Depay * rtph264depay) gst_caps_unref (tmp_caps); } + gst_caps_unref (old_caps); } else { res = gst_pad_set_caps (GST_RTP_BASE_DEPAYLOAD_SRCPAD (rtph264depay), diff --git a/gst/rtp/gstrtpsbcdepay.c b/gst/rtp/gstrtpsbcdepay.c index 7f8ba3966..353b4033b 100644 --- a/gst/rtp/gstrtpsbcdepay.c +++ b/gst/rtp/gstrtpsbcdepay.c @@ -181,6 +181,8 @@ gst_rtp_sbc_depay_setcaps (GstRTPBaseDepayload * base, GstCaps * caps) } gst_caps_unref (outcaps); + if (oldcaps) + gst_caps_unref (oldcaps); return TRUE; |