[gst-cvs] gst-plugins-good: flvmux: Fix resetting of the element

Sebastian Dröge slomo at kemper.freedesktop.org
Mon Aug 3 11:09:35 PDT 2009


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

Author: Sebastian Dröge <sebastian.droege at collabora.co.uk>
Date:   Mon Aug  3 20:07:00 2009 +0200

flvmux: Fix resetting of the element

Reset the have_video/have_audio flags and make sure to
properly release the request pads.

Partially fixes bug #590447.

---

 gst/flv/gstflvmux.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/gst/flv/gstflvmux.c b/gst/flv/gstflvmux.c
index ab385f0..fd7a76e 100644
--- a/gst/flv/gstflvmux.c
+++ b/gst/flv/gstflvmux.c
@@ -183,12 +183,7 @@ gst_flv_mux_reset (GstElement * element)
   while ((sl = mux->collect->data) != NULL) {
     GstFlvPad *cpad = (GstFlvPad *) sl->data;
 
-    if (cpad->audio_codec_data)
-      gst_buffer_unref (cpad->audio_codec_data);
-    if (cpad->video_codec_data)
-      gst_buffer_unref (cpad->video_codec_data);
-
-    gst_collect_pads_remove_pad (mux->collect, cpad->collect.pad);
+    gst_element_release_request_pad (element, cpad->collect.pad);
   }
 
   if (mux->tags)
@@ -200,6 +195,8 @@ gst_flv_mux_reset (GstElement * element)
   mux->index = NULL;
   mux->byte_count = 0;
 
+  mux->have_audio = mux->have_video = FALSE;
+
   mux->state = GST_FLV_MUX_STATE_HEADER;
 }
 





More information about the Gstreamer-commits mailing list