From 276269d956723ddc342c4de175f71a7fc9fc54b5 Mon Sep 17 00:00:00 2001 From: Sebastian Rasmussen Date: Thu, 7 Aug 2014 16:34:36 +0200 Subject: [PATCH] rtph263ppay: Unref pad template caps after use Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734435 --- gst/rtp/gstrtph263ppay.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gst/rtp/gstrtph263ppay.c b/gst/rtp/gstrtph263ppay.c index 073a6b5..54adb20 100644 --- a/gst/rtp/gstrtph263ppay.c +++ b/gst/rtp/gstrtph263ppay.c @@ -184,8 +184,10 @@ gst_rtp_h263p_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps) peercaps = gst_pad_peer_query_caps (GST_RTP_BASE_PAYLOAD_SRCPAD (payload), NULL); if (peercaps) { - GstCaps *intersect = gst_caps_intersect (peercaps, - gst_pad_get_pad_template_caps (GST_RTP_BASE_PAYLOAD_SRCPAD (payload))); + GstCaps *tcaps = + gst_pad_get_pad_template_caps (GST_RTP_BASE_PAYLOAD_SRCPAD (payload)); + GstCaps *intersect = gst_caps_intersect (peercaps, tcaps); + gst_caps_unref (tcaps); gst_caps_unref (peercaps); if (!gst_caps_is_empty (intersect)) { -- 2.7.4