[gst-cvs] gst-plugins-good: matroskamux: don't forward tag events downstream

Tim Müller tpm at kemper.freedesktop.org
Thu Oct 14 06:01:16 PDT 2010


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

Author: Tim-Philipp Müller <tim.muller at collabora.co.uk>
Date:   Thu Oct 14 00:22:03 2010 +0100

matroskamux: don't forward tag events downstream

Don't forward stream-specific tag events downstream (esp. not
before any newsegment event).x

---

 gst/matroska/matroska-mux.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/gst/matroska/matroska-mux.c b/gst/matroska/matroska-mux.c
index 7861adc..2a37550 100644
--- a/gst/matroska/matroska-mux.c
+++ b/gst/matroska/matroska-mux.c
@@ -609,7 +609,6 @@ gst_matroska_mux_handle_sink_event (GstPad * pad, GstEvent * event)
 
   mux = GST_MATROSKA_MUX (gst_pad_get_parent (pad));
 
-  /* FIXME: aren't we either leaking events here or doing a wrong unref? */
   switch (GST_EVENT_TYPE (event)) {
     case GST_EVENT_TAG:{
       gchar *lang = NULL;
@@ -636,8 +635,13 @@ gst_matroska_mux_handle_sink_event (GstPad * pad, GstEvent * event)
         g_free (lang);
       }
 
+      /* FIXME: what about stream-specific tags? */
       gst_tag_setter_merge_tags (GST_TAG_SETTER (mux), list,
           gst_tag_setter_get_tag_merge_mode (GST_TAG_SETTER (mux)));
+
+      /* handled this, don't want collectpads to forward it downstream */
+      ret = FALSE;
+      gst_event_unref (event);
       break;
     }
     case GST_EVENT_NEWSEGMENT:
@@ -652,6 +656,7 @@ gst_matroska_mux_handle_sink_event (GstPad * pad, GstEvent * event)
   /* now GstCollectPads can take care of the rest, e.g. EOS */
   if (ret)
     ret = mux->collect_event (pad, event);
+
   gst_object_unref (mux);
 
   return ret;





More information about the Gstreamer-commits mailing list