oggdemux: send stream tags after newsegment and global tags
authorMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Wed, 27 Oct 2010 08:58:16 +0000 (10:58 +0200)
committerMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Fri, 3 Dec 2010 12:53:56 +0000 (13:53 +0100)
ext/ogg/gstoggdemux.c

index 20eba9a..28ad3c4 100644 (file)
@@ -1742,10 +1742,6 @@ gst_ogg_demux_activate_chain (GstOggDemux * ogg, GstOggChain * chain,
 
     gst_element_add_pad (GST_ELEMENT (ogg), GST_PAD_CAST (pad));
     pad->added = TRUE;
-    if (event && pad->map.taglist) {
-      gst_element_found_tags_for_pad (GST_ELEMENT_CAST (ogg),
-          GST_PAD_CAST (pad), pad->map.taglist);
-    }
   }
   /* prefer the index bitrate over the ones encoded in the streams */
   ogg->bitrate = (idx_bitrate ? idx_bitrate : bitrate);
@@ -1775,6 +1771,14 @@ gst_ogg_demux_activate_chain (GstOggDemux * ogg, GstOggChain * chain,
 
     pad = g_array_index (chain->streams, GstOggPad *, i);
 
+    /* FIXME also streaming thread */
+    if (pad->map.taglist) {
+      GST_DEBUG_OBJECT (ogg, "pushing tags");
+      gst_element_found_tags_for_pad (GST_ELEMENT_CAST (ogg),
+          GST_PAD_CAST (pad), pad->map.taglist);
+      pad->map.taglist = NULL;
+    }
+
     GST_DEBUG_OBJECT (ogg, "pushing headers");
     /* push headers */
     for (walk = pad->map.headers; walk; walk = g_list_next (walk)) {