From: Bjarne Rosengren Date: Thu, 7 Feb 2008 16:38:55 +0000 (+0000) Subject: gst/matroska/ebml-write.c: Don't leak buffers when we don't push them downstream. X-Git-Tag: RELEASE-0_10_7~36 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=639b1183b4ef36d02c435a659ab3c755d06b9f0d;p=platform%2Fupstream%2Fgst-plugins-good.git gst/matroska/ebml-write.c: Don't leak buffers when we don't push them downstream. Original commit message from CVS: Patch by: Bjarne Rosengren * gst/matroska/ebml-write.c: (gst_ebml_write_element_push): Don't leak buffers when we don't push them downstream. Fixes bug #514965. --- diff --git a/ChangeLog b/ChangeLog index 2a9055a..93d7426 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-02-07 Sebastian Dröge + + Patch by: Bjarne Rosengren + + * gst/matroska/ebml-write.c: (gst_ebml_write_element_push): + Don't leak buffers when we don't push them downstream. + Fixes bug #514965. + 2008-02-07 Tim-Philipp Müller * configure.ac: diff --git a/gst/matroska/ebml-write.c b/gst/matroska/ebml-write.c index 1a039e4..ca08613 100644 --- a/gst/matroska/ebml-write.c +++ b/gst/matroska/ebml-write.c @@ -371,6 +371,9 @@ gst_ebml_write_element_push (GstEbmlWrite * ebml, GstBuffer * buf) buf = gst_buffer_make_metadata_writable (buf); gst_buffer_set_caps (buf, GST_PAD_CAPS (ebml->srcpad)); ebml->last_write_result = gst_pad_push (ebml->srcpad, buf); + } else { + if (buf != ebml->cache) + gst_buffer_unref (buf); } }