Index: ext/vorbis/vorbisdec.c
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-base/ext/vorbis/vorbisdec.c,v
retrieving revision 1.111
diff -u -p -r1.111 vorbisdec.c
--- ext/vorbis/vorbisdec.c	12 Jul 2006 10:37:18 -0000	1.111
+++ ext/vorbis/vorbisdec.c	12 Jul 2006 12:40:27 -0000
@@ -541,12 +541,12 @@ vorbis_dec_sink_event (GstPad * pad, Gst
           rate, arate, format, start, stop, time);
 
       if (dec->initialized)
-        /* and forward */
-        ret = gst_pad_push_event (dec->srcpad, event);
+	/* and forward */
+	ret = gst_pad_push_event (dec->srcpad, event);
       else {
-        /* store it to send once we're initialized */
-        dec->pendingevents = g_list_append (dec->pendingevents, event);
-        ret = TRUE;
+	/* store it to send once we're initialized */
+	dec->pendingevents = g_list_append(dec->pendingevents, event);
+	ret = TRUE;
       }
       break;
     }
@@ -662,11 +662,12 @@ vorbis_handle_comment_packet (GstVorbisD
 
   buf = gst_buffer_new_and_alloc (packet->bytes);
   GST_BUFFER_DATA (buf) = packet->packet;
-
+  
   vd->taglist =
-      gst_tag_list_merge (vd->taglist,
-      gst_tag_list_from_vorbiscomment_buffer (buf, (guint8 *) "\003vorbis", 7,
-          &encoder), GST_TAG_MERGE_REPLACE);
+    gst_tag_list_merge (vd->taglist,
+			gst_tag_list_from_vorbiscomment_buffer (buf, (guint8 *) "\003vorbis", 7,
+								&encoder),
+			GST_TAG_MERGE_REPLACE);
 
   gst_buffer_unref (buf);
 
@@ -705,9 +706,14 @@ vorbis_handle_comment_packet (GstVorbisD
   }
 
   if (vd->initialized) {
-    gst_element_found_tags_for_pad (GST_ELEMENT_CAST (vd), vd->srcpad,
-        vd->taglist);
+    gst_element_found_tags_for_pad (GST_ELEMENT_CAST (vd), vd->srcpad, vd->taglist);
     vd->taglist = NULL;
+  } else {
+    /* Only post them as messages for the time being. *
+     * They will be pushed on the pad once the decoder is initialized */
+    gst_element_post_message (GST_ELEMENT_CAST (vd), 
+			      gst_message_new_tag (GST_OBJECT (vd), 
+						   gst_tag_list_copy (vd->taglist)));
   }
 
   return GST_FLOW_OK;
@@ -716,7 +722,7 @@ vorbis_handle_comment_packet (GstVorbisD
 static GstFlowReturn
 vorbis_handle_type_packet (GstVorbisDec * vd)
 {
-  GList *walk;
+  GList * walk;
 
   g_assert (vd->initialized == FALSE);
 
@@ -732,8 +738,8 @@ vorbis_handle_type_packet (GstVorbisDec 
   }
 
   if (vd->taglist) {
-    gst_element_found_tags_for_pad (GST_ELEMENT_CAST (vd), vd->srcpad,
-        vd->taglist);
+    /* The tags have already been sent on the bus as messages. */
+    gst_pad_push_event (vd->srcpad, gst_event_new_tag (vd->taglist));
     vd->taglist = NULL;
   }
 
