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 <bjarne at axis dot com>
* gst/matroska/ebml-write.c: (gst_ebml_write_element_push):
Don't leak buffers when we don't push them downstream.
Fixes bug #514965.
This commit is contained in:
Bjarne Rosengren 2008-02-07 16:38:55 +00:00 committed by Sebastian Dröge
parent 564ffdee11
commit 639b1183b4
2 changed files with 11 additions and 0 deletions

View file

@ -1,3 +1,11 @@
2008-02-07 Sebastian Dröge <slomo@circular-chaos.org>
Patch by: Bjarne Rosengren <bjarne at axis dot com>
* 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 <tim at centricular dot net>
* configure.ac:

View file

@ -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);
}
}