ext/vorbis/vorbisdec.c: Post tag messages on the bus even if we're not initialized.

Original commit message from CVS:
* ext/vorbis/vorbisdec.c: (gst_vorbis_dec_reset),
(vorbis_dec_sink_event), (vorbis_handle_comment_packet),
(vorbis_handle_type_packet):
Post tag messages on the bus even if we're not initialized.
If we're not initialized, we still postpone the event pushing of tags.
This commit is contained in:
Edward Hervey 2006-07-12 13:04:15 +00:00
parent ccee48bb85
commit 7a10838cd8
2 changed files with 15 additions and 2 deletions

View file

@ -1,3 +1,11 @@
2006-07-12 Edward Hervey <edward@fluendo.com>
* ext/vorbis/vorbisdec.c: (gst_vorbis_dec_reset),
(vorbis_dec_sink_event), (vorbis_handle_comment_packet),
(vorbis_handle_type_packet):
Post tag messages on the bus even if we're not initialized.
If we're not initialized, we still postpone the event pushing of tags.
2006-07-12 Wim Taymans <wim@fluendo.com>
* ext/alsa/gstalsasink.c: (set_hwparams), (gst_alsasink_prepare):

View file

@ -708,6 +708,11 @@ vorbis_handle_comment_packet (GstVorbisDec * vd, ogg_packet * packet)
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;
@ -732,8 +737,8 @@ vorbis_handle_type_packet (GstVorbisDec * vd)
}
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;
}