From fb29483259a126006be9df0127a568a1150eb5a6 Mon Sep 17 00:00:00 2001 From: Thiago Santos Date: Wed, 17 Dec 2014 21:52:13 -0300 Subject: [PATCH] opusenc: plug ref leak of template caps the pad template caps is already a new ref. No need to copy. --- ext/opus/gstopusenc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ext/opus/gstopusenc.c b/ext/opus/gstopusenc.c index 4d118b054c..f0d69d362e 100644 --- a/ext/opus/gstopusenc.c +++ b/ext/opus/gstopusenc.c @@ -734,9 +734,7 @@ gst_opus_enc_sink_getcaps (GstAudioEncoder * benc, GstCaps * filter) peercaps = gst_pad_peer_query_caps (GST_AUDIO_ENCODER_SRC_PAD (benc), NULL); if (!peercaps) { GST_DEBUG_OBJECT (benc, "No peercaps, returning template sink caps"); - return - gst_caps_copy (gst_pad_get_pad_template_caps - (GST_AUDIO_ENCODER_SINK_PAD (benc))); + return gst_pad_get_pad_template_caps (GST_AUDIO_ENCODER_SINK_PAD (benc)); } tcaps = gst_pad_get_pad_template_caps (GST_AUDIO_ENCODER_SRC_PAD (benc));