From 8285dfd7a2777fe33c5c8cf71cd2230a3a71ca1f Mon Sep 17 00:00:00 2001 From: David Schleef Date: Thu, 5 Feb 2004 22:24:58 +0000 Subject: gst/mpegaudioparse/gstmpegaudioparse.c: Unref leaked buffer. (Noticed by Ronald) Original commit message from CVS: * gst/mpegaudioparse/gstmpegaudioparse.c: (gst_mp3parse_chain): Unref leaked buffer. (Noticed by Ronald) --- gst/mpegaudioparse/gstmpegaudioparse.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gst') diff --git a/gst/mpegaudioparse/gstmpegaudioparse.c b/gst/mpegaudioparse/gstmpegaudioparse.c index f00e5bcb..aeed48f1 100644 --- a/gst/mpegaudioparse/gstmpegaudioparse.c +++ b/gst/mpegaudioparse/gstmpegaudioparse.c @@ -316,10 +316,13 @@ gst_mp3parse_chain (GstPad *pad, GstData *_data) /* if we have something left from the previous frame */ if (mp3parse->partialbuf) { + GstBuffer *newbuf; - mp3parse->partialbuf = gst_buffer_merge(mp3parse->partialbuf, buf); + newbuf = gst_buffer_merge(mp3parse->partialbuf, buf); /* and the one we received.. */ gst_buffer_unref(buf); + gst_buffer_unref(mp3parse->partialbuf); + mp3parse->partialbuf = newbuf; } else { mp3parse->partialbuf = buf; -- cgit v1.2.1