From 64b5df4dbaa632e0e11900b34e6b113fec32f231 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 11 Feb 2008 09:13:33 +0000 Subject: [PATCH] ext/lame/gstlame.c: Don't leak the allowed caps. Original commit message from CVS: * ext/lame/gstlame.c: (gst_lame_setup): Don't leak the allowed caps. * tests/check/pipelines/lame.c: (GST_START_TEST): Stop leaking all buffers. Fixes bug #515575. --- ext/lame/gstlame.c | 2 ++ tests/check/pipelines/lame.c | 1 + 2 files changed, 3 insertions(+) diff --git a/ext/lame/gstlame.c b/ext/lame/gstlame.c index bee623c378..6e2d72fd03 100644 --- a/ext/lame/gstlame.c +++ b/ext/lame/gstlame.c @@ -1200,6 +1200,8 @@ gst_lame_setup (GstLame * lame) GST_DEBUG_OBJECT (lame, "Letting lame choose sample rate"); lame_set_out_samplerate (lame->lgf, 0); } + gst_caps_unref (allowed_caps); + allowed_caps = NULL; } else { GST_DEBUG_OBJECT (lame, "No peer yet, letting lame choose sample rate"); lame_set_out_samplerate (lame->lgf, 0); diff --git a/tests/check/pipelines/lame.c b/tests/check/pipelines/lame.c index e84d565c69..ec941f0597 100644 --- a/tests/check/pipelines/lame.c +++ b/tests/check/pipelines/lame.c @@ -58,6 +58,7 @@ GST_START_TEST (test_format) gst_buffer_straw_stop_pipeline (bin, pad); + gst_buffer_unref (buffer); gst_object_unref (pad); gst_object_unref (bin); }