[0.11] gst-plugins-good: flvmux: don't try to push already-freed buffers

Sebastian Dröge slomo at kemper.freedesktop.org
Tue Jan 10 05:33:26 PST 2012


Module: gst-plugins-good
Branch: 0.11
Commit: 89521166b24c394785842819c416575170677c5f
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=89521166b24c394785842819c416575170677c5f

Author: Tim-Philipp Müller <tim.muller at collabora.co.uk>
Date:   Sun Dec 25 14:23:29 2011 +0000

flvmux: don't try to push already-freed buffers

Fixes unit test.

---

 gst/flv/gstflvmux.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/gst/flv/gstflvmux.c b/gst/flv/gstflvmux.c
index c7ee0a8..aac216a 100644
--- a/gst/flv/gstflvmux.c
+++ b/gst/flv/gstflvmux.c
@@ -567,6 +567,7 @@ gst_flv_mux_release_pad (GstElement * element, GstPad * pad)
 static GstFlowReturn
 gst_flv_mux_push (GstFlvMux * mux, GstBuffer * buffer)
 {
+  buffer = gst_buffer_make_metadata_writable (buffer);
   gst_buffer_set_caps (buffer, GST_PAD_CAPS (mux->srcpad));
   /* pushing the buffer that rewrites the header will make it no longer be the
    * total output size in bytes, but it doesn't matter at that point */
@@ -937,6 +938,7 @@ end:
 
   if (!tags_written) {
     gst_buffer_unref (script_tag);
+    script_tag = NULL;
     goto exit;
   }
 



More information about the gstreamer-commits mailing list