From 2d15397f290a12d2e187a9e16b4559bf388aa27e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Mon, 16 Jan 2006 15:19:55 +0000 Subject: [PATCH] ext/theora/theoradec.c: Post taglist actually on bus instead of just freeing it (fixes #327114 and totem bug #327080). Original commit message from CVS: * ext/theora/theoradec.c: (theora_handle_comment_packet): Post taglist actually on bus instead of just freeing it (fixes #327114 and totem bug #327080). * ext/vorbis/vorbisdec.c: (vorbis_handle_comment_packet): Use gst_element_found_tags_for_pad(), so that the tags are sent downstream as an event as well. --- ChangeLog | 10 ++++++++++ ext/theora/theoradec.c | 10 +++++++--- ext/vorbis/vorbisdec.c | 4 +--- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 317a583e49..3c7b176f4e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2006-01-16 Tim-Philipp Müller + + * ext/theora/theoradec.c: (theora_handle_comment_packet): + Post taglist actually on bus instead of just freeing it + (fixes #327114 and totem bug #327080). + + * ext/vorbis/vorbisdec.c: (vorbis_handle_comment_packet): + Use gst_element_found_tags_for_pad(), so that the tags + are sent downstream as an event as well. + 2006-01-15 Thomas Vander Stichele * sys/ximage/ximagesink.c: (gst_ximage_buffer_finalize), diff --git a/ext/theora/theoradec.c b/ext/theora/theoradec.c index d8957bf49f..7316ac8257 100644 --- a/ext/theora/theoradec.c +++ b/ext/theora/theoradec.c @@ -684,11 +684,15 @@ theora_handle_comment_packet (GstTheoraDec * dec, ogg_packet * packet) } gst_tag_list_add (list, GST_TAG_MERGE_REPLACE, GST_TAG_ENCODER_VERSION, dec->info.version_major, - GST_TAG_NOMINAL_BITRATE, dec->info.target_bitrate, GST_TAG_VIDEO_CODEC, "Theora", NULL); - //gst_element_found_tags_for_pad (GST_ELEMENT (dec), dec->srcpad, 0, list); - gst_tag_list_free (list); + if (dec->info.target_bitrate > 0) { + gst_tag_list_add (list, GST_TAG_MERGE_REPLACE, + GST_TAG_BITRATE, dec->info.target_bitrate, + GST_TAG_NOMINAL_BITRATE, dec->info.target_bitrate, NULL); + } + + gst_element_found_tags_for_pad (GST_ELEMENT (dec), dec->srcpad, list); return GST_FLOW_OK; } diff --git a/ext/vorbis/vorbisdec.c b/ext/vorbis/vorbisdec.c index ad33599b52..6b275aba77 100644 --- a/ext/vorbis/vorbisdec.c +++ b/ext/vorbis/vorbisdec.c @@ -568,7 +568,6 @@ vorbis_handle_comment_packet (GstVorbisDec * vd, ogg_packet * packet) { guint bitrate = 0; gchar *encoder = NULL; - GstMessage *message; GstTagList *list; GstBuffer *buf; @@ -617,8 +616,7 @@ vorbis_handle_comment_packet (GstVorbisDec * vd, ogg_packet * packet) GST_TAG_BITRATE, (guint) bitrate, NULL); } - message = gst_message_new_tag ((GstObject *) vd, list); - gst_element_post_message (GST_ELEMENT (vd), message); + gst_element_found_tags_for_pad (GST_ELEMENT (vd), vd->srcpad, list); return GST_FLOW_OK; }