[MPlayer-dev-eng] [PATCH] ignore bad lavf mp4a tag

Reimar D?ffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Sun Apr 15 11:28:57 CEST 2007

since obviously nobody wants to fix the codec_tag-is-always-mp4a for mp4
files in lavf (some even arguing it makes sense) and I've had enough of
those useless codec_tag discussion (make even more annoying since it is
not exactly documented what it is supposed to do), attached patch just
ignores this tag in demux_lavf.
I will apply unless some other fix for it is applied within three days.
Does someone know what happened to the samples? I can't find them on
mphq anymore?? I will upload one if necessary.

Reimar Döffinger
-------------- next part --------------
Index: libmpdemux/demux_lavf.c
--- libmpdemux/demux_lavf.c	(revision 22994)
+++ libmpdemux/demux_lavf.c	(working copy)
@@ -309,6 +328,9 @@
             priv->astreams[priv->audio_streams] = i;
+            // mp4a tag is used for all mp4 files no matter what they actually contain
+            if(codec->codec_tag == MKTAG('m', 'p', '4', 'a'))
+                codec->codec_tag= 0;
                 codec->codec_tag= av_codec_get_tag(mp_wav_taglists, codec->codec_id);
             wf->wFormatTag= codec->codec_tag;

More information about the MPlayer-dev-eng mailing list