gst/avi/gstavimux.c: Instead of filtering wrongly just use the mergemode. Application...
authorStefan Kost <ensonic@users.sourceforge.net>
Mon, 15 Dec 2008 15:59:53 +0000 (15:59 +0000)
committerStefan Kost <ensonic@users.sourceforge.net>
Mon, 15 Dec 2008 15:59:53 +0000 (15:59 +0000)
Original commit message from CVS:
* gst/avi/gstavimux.c:
Instead of filtering wrongly just use the mergemode. Applications is
use KEEP_ALL if they want to supress tag-events. Fixes #563221 for
avi for real (I hope). Everyone chime in, before I fix the others.

ChangeLog
gst/avi/gstavimux.c

index 98e0abf..4c9e05e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2008-12-15  Stefan Kost  <ensonic@users.sf.net>
 
+       * gst/avi/gstavimux.c:
+         Instead of filtering wrongly just use the mergemode. Applications is
+         use KEEP_ALL if they want to supress tag-events. Fixes #563221 for
+         avi for real (I hope). Everyone chime in, before I fix the others.
+
+2008-12-15  Stefan Kost  <ensonic@users.sf.net>
+
        * ext/pulse/pulsemixerctrl.c:
          Add note about memleak.
 
index 24adda9..697ae9e 100644 (file)
@@ -1687,20 +1687,14 @@ gst_avi_mux_handle_event (GstPad * pad, GstEvent * event)
   avimux = GST_AVI_MUX (gst_pad_get_parent (pad));
 
   switch (GST_EVENT_TYPE (event)) {
-    case GST_EVENT_TAG:
-      if (gst_tag_setter_get_tag_merge_mode (GST_TAG_SETTER (avimux)) !=
-          GST_TAG_MERGE_REPLACE_ALL) {
-        GstTagList *list;
-        gst_event_parse_tag (event, &list);
-        if (avimux->tags) {
-          gst_tag_list_insert (avimux->tags, list, GST_TAG_MERGE_PREPEND);
-        } else {
-          avimux->tags = gst_tag_list_copy (list);
-        }
-      } else {
-        GST_DEBUG ("skipping tag-event");
-      }
+    case GST_EVENT_TAG:{
+      GstTagList *list;
+
+      gst_event_parse_tag (event, &list);
+      avimux->tags = gst_tag_list_merge (avimux->tags, list,
+          gst_tag_setter_get_tag_merge_mode (GST_TAG_SETTER (avimux)));
       break;
+    }
     default:
       break;
   }