diff --git a/ChangeLog b/ChangeLog index 83dba28843..522fe52ec7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2007-05-17 Tim-Philipp Müller + + * 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 * gst/playback/gstqueue2.c: (update_rates): diff --git a/gst/playback/gststreaminfo.c b/gst/playback/gststreaminfo.c index d86ce509e9..9a35d77c6d 100644 --- a/gst/playback/gststreaminfo.c +++ b/gst/playback/gststreaminfo.c @@ -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);