gst/playback/gststreaminfo.c: Ignore video-codec tag for audio streams and ignore audio-codec tags for video streams....

Original commit message from CVS:
* gst/playback/gststreaminfo.c: (cb_probe):
Ignore video-codec tag for audio streams and ignore audio-codec tags
for video streams. Should make codec name collection a bit more
robust against sloppy demuxers that send tag events containing both
tags down each pad.
This commit is contained in:
Tim-Philipp Müller 2007-05-17 16:11:03 +00:00
parent d33939800d
commit 2cd5f527fe
2 changed files with 12 additions and 2 deletions

View file

@ -1,3 +1,11 @@
2007-05-17 Tim-Philipp Müller <tim at centricular dot net>
* gst/playback/gststreaminfo.c: (cb_probe):
Ignore video-codec tag for audio streams and ignore audio-codec tags
for video streams. Should make codec name collection a bit more
robust against sloppy demuxers that send tag events containing both
tags down each pad.
2007-05-17 Wim Taymans <wim@fluendo.com>
* gst/playback/gstqueue2.c: (update_rates):

View file

@ -184,12 +184,14 @@ cb_probe (GstPad * pad, GstEvent * e, gpointer user_data)
gst_event_parse_tag (e, &list);
if (gst_tag_list_get_string (list, GST_TAG_VIDEO_CODEC, &codec)) {
if (info->type != GST_STREAM_TYPE_AUDIO &&
gst_tag_list_get_string (list, GST_TAG_VIDEO_CODEC, &codec)) {
g_free (info->codec);
info->codec = codec;
GST_LOG_OBJECT (pad, "codec = %s (video)", codec);
g_object_notify (G_OBJECT (info), "codec");
} else if (gst_tag_list_get_string (list, GST_TAG_AUDIO_CODEC, &codec)) {
} else if (info->type != GST_STREAM_TYPE_VIDEO &&
gst_tag_list_get_string (list, GST_TAG_AUDIO_CODEC, &codec)) {
g_free (info->codec);
info->codec = codec;
GST_LOG_OBJECT (pad, "codec = %s (audio)", codec);