From e4e2e3c7b0af50701526d9bbcfbead7105988e03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Wed, 28 Sep 2011 14:32:20 +0100 Subject: [PATCH 1/2] audioencoder: remove more tags from upstream tag events such as bitrate tags We want to remove all codec specific tags. --- gst-libs/gst/audio/gstaudioencoder.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/gst-libs/gst/audio/gstaudioencoder.c b/gst-libs/gst/audio/gstaudioencoder.c index 1a8887ea97..383da3f3c0 100644 --- a/gst-libs/gst/audio/gstaudioencoder.c +++ b/gst-libs/gst/audio/gstaudioencoder.c @@ -1280,8 +1280,19 @@ gst_audio_encoder_sink_eventfunc (GstAudioEncoder * enc, GstEvent * event) gst_event_parse_tag (event, &tags); tags = gst_tag_list_copy (tags); gst_event_unref (event); + + /* FIXME: make generic based on GST_TAG_FLAG_ENCODED */ gst_tag_list_remove_tag (tags, GST_TAG_CODEC); gst_tag_list_remove_tag (tags, GST_TAG_AUDIO_CODEC); + gst_tag_list_remove_tag (tags, GST_TAG_VIDEO_CODEC); + gst_tag_list_remove_tag (tags, GST_TAG_SUBTITLE_CODEC); + gst_tag_list_remove_tag (tags, GST_TAG_CONTAINER_FORMAT); + gst_tag_list_remove_tag (tags, GST_TAG_BITRATE); + gst_tag_list_remove_tag (tags, GST_TAG_NOMINAL_BITRATE); + gst_tag_list_remove_tag (tags, GST_TAG_MAXIMUM_BITRATE); + gst_tag_list_remove_tag (tags, GST_TAG_MINIMUM_BITRATE); + gst_tag_list_remove_tag (tags, GST_TAG_ENCODER); + gst_tag_list_remove_tag (tags, GST_TAG_ENCODER_VERSION); event = gst_event_new_tag (tags); GST_AUDIO_ENCODER_STREAM_LOCK (enc); From 8633eb391da28e5e645912d0b62b99ee46e5224d Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Wed, 28 Sep 2011 15:41:16 +0200 Subject: [PATCH 2/2] audiodecoder: really push pending events --- gst-libs/gst/audio/gstaudiodecoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst-libs/gst/audio/gstaudiodecoder.c b/gst-libs/gst/audio/gstaudiodecoder.c index 3a910a81da..8ad677a098 100644 --- a/gst-libs/gst/audio/gstaudiodecoder.c +++ b/gst-libs/gst/audio/gstaudiodecoder.c @@ -735,7 +735,7 @@ gst_audio_decoder_finish_frame (GstAudioDecoder * dec, GstBuffer * buf, priv->pending_events = NULL; GST_DEBUG_OBJECT (dec, "Pushing pending events"); - for (l = priv->pending_events; l; l = l->next) + for (l = pending_events; l; l = l->next) gst_pad_push_event (dec->srcpad, l->data); g_list_free (pending_events); }