From 8d6e315b012a8c7bc2ac92e3127409d412eb8738 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Thu, 28 Apr 2016 09:59:25 +0300 Subject: [PATCH] opusdec: fix caps leaks The caps returned by gst_pad_get_allowed_caps() was leaked. https://bugzilla.gnome.org/show_bug.cgi?id=765706 --- ext/opus/gstopusdec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ext/opus/gstopusdec.c b/ext/opus/gstopusdec.c index b25b68f..052b4a4 100644 --- a/ext/opus/gstopusdec.c +++ b/ext/opus/gstopusdec.c @@ -267,6 +267,7 @@ gst_opus_dec_negotiate (GstOpusDec * dec, const GstAudioChannelPosition * pos) if (gst_caps_is_empty (inter)) { GST_DEBUG_OBJECT (dec, "Empty intersection, failed to negotiate"); gst_caps_unref (inter); + gst_caps_unref (caps); return FALSE; } @@ -283,6 +284,7 @@ gst_opus_dec_negotiate (GstOpusDec * dec, const GstAudioChannelPosition * pos) dec->sample_rate = rate; dec->n_channels = channels; + gst_caps_unref (caps); } if (dec->n_channels == 0) { -- 2.7.4