From 2ca8f88ecc00824baed1c6a5e3ca74b305528edc Mon Sep 17 00:00:00 2001 From: Vincent Penquerc'h Date: Tue, 10 Jan 2012 13:38:42 +0000 Subject: [PATCH 1/2] opusenc: fix caps leak --- ext/opus/gstopusenc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/opus/gstopusenc.c b/ext/opus/gstopusenc.c index 0ccbbebc5f..016b891c81 100644 --- a/ext/opus/gstopusenc.c +++ b/ext/opus/gstopusenc.c @@ -897,6 +897,7 @@ gst_opus_enc_handle_frame (GstAudioEncoder * benc, GstBuffer * buf) GST_DEBUG_OBJECT (enc, "here are the caps: %" GST_PTR_FORMAT, caps); gst_pad_set_caps (GST_AUDIO_ENCODER_SRC_PAD (enc), caps); + gst_caps_unref (caps); enc->header_sent = TRUE; } From d6b60c62e68169b6e02809f9ef8fc1dde3d28520 Mon Sep 17 00:00:00 2001 From: Vincent Penquerc'h Date: Tue, 10 Jan 2012 13:38:50 +0000 Subject: [PATCH 2/2] opusenc: fix slist leak --- ext/opus/gstopusenc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ext/opus/gstopusenc.c b/ext/opus/gstopusenc.c index 016b891c81..9b475cf8c7 100644 --- a/ext/opus/gstopusenc.c +++ b/ext/opus/gstopusenc.c @@ -360,6 +360,7 @@ gst_opus_enc_stop (GstAudioEncoder * benc) gst_tag_list_free (enc->tags); enc->tags = NULL; g_slist_foreach (enc->headers, (GFunc) gst_buffer_unref, NULL); + g_slist_free (enc->headers); enc->headers = NULL; gst_tag_setter_reset_tags (GST_TAG_SETTER (enc)); @@ -885,6 +886,7 @@ gst_opus_enc_handle_frame (GstAudioEncoder * benc, GstBuffer * buf) GstCaps *caps; g_slist_foreach (enc->headers, (GFunc) gst_buffer_unref, NULL); + g_slist_free (enc->headers); enc->headers = NULL; gst_opus_header_create_caps (&caps, &enc->headers, enc->n_channels,