[MPlayer-dev-eng] incoming/Vorbis_in_MP4_lavf_fail.mp4

Baptiste Coudurier baptiste.coudurier at smartjog.com
Sat Mar 17 15:55:24 CET 2007


Hi

Reimar Döffinger wrote:
> Hello,
> On Sat, Mar 17, 2007 at 12:39:59AM +0100, Baptiste Coudurier wrote:
>> Michael Niedermayer wrote:
>>> On Fri, Mar 16, 2007 at 06:36:46PM +0100, Reimar Döffinger wrote:
>>>> On Fri, Mar 16, 2007 at 03:56:58PM +0100, Nico Sabbi wrote:
>>>>> Compn wrote:
>>>>>> ffplay and mplayer detects audio correctly
>>>>>>
>>>>>> mplayer -demuxer lavf does not.
>>>>>>
>>>>>> adding format 0x6134706D to audiocodec vorbis allows it to play
>>>>>> but its still trying faad first.
>>>>>>
>>>>>> Opening audio decoder: [faad] AAC (MPEG2/4 Advanced Audio Coding)
>>>>>> FAAD: Failed to initialize the decoder!
>>>>>> ADecoder init failed :(
>>>>>> ADecoder init failed :(
>>>>>> Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
>>>>>> AUDIO: 48000 Hz, 2 ch, s16le, 0.0 kbit/0.00% (ratio: 0->192000)
>>>>>> Selected audio codec: [ffvorbis] afm: ffmpeg (FFmpeg Vorbis decoder)
>>>>>>
>>>>> try with svn blame who broke it, please.
>>>> I think this was never fixed. The problem IIRC is that lavf demuxer uses
>>>> a different mov atom to detect the format, but that one only contains
>>>> "mp4a".
>>> if codec_tag is mp4a then this is wrong, codec_tag should contain the thing
>>> which is looked up in ff_mov_obj_type
>>>
>>> grep ff_mov_obj_type in lavf/mov.c set codec_tag to it run regression tests
>>> check if this fixes the mplayer+lavf problem send patch
>> Humm well it makes sense for mp4, not sure for mov, dunno if other
>> codecs use "mp4a" as stsd tag in mov but stores something else and use
>> "esds" atom, and tag will be a simple int, but I've no real objection.
> 
> Hm. Attached patch fixes the problem. You could of course check against
> codec_movaudio_tags if codec_tag still matches codec_id and only unset
> tag if it doesn't.
> 
> Greetings,
> Reimar Döffinger
> 
> 
> ------------------------------------------------------------------------
> 
> Index: libavformat/mov.c
> ===================================================================
> --- libavformat/mov.c	(revision 8422)
> +++ libavformat/mov.c	(working copy)
> @@ -382,6 +382,7 @@
>          sc->esds.avg_bitrate = get_be32(pb);
>  
>          st->codec->codec_id= codec_get_id(ff_mov_obj_type, sc->esds.object_type_id);
> +        st->codec->codec_tag= 0;
>          dprintf(c->fc, "esds object type id %d\n", sc->esds.object_type_id);
>          len = mov_mp4_read_descr(c, pb, &tag);
>          if (tag == MP4DecSpecificDescrTag) {
> 

it seems ok, add a comment "// reset, conflicts with id in mp4", commit
if it does not break ffmpeg/ffplay with mp3on4, vorbis and mpeg2video in
mp4.

-- 
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
SMARTJOG S.A.                                    http://www.smartjog.com
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
Phone: +33 1 49966312



More information about the MPlayer-dev-eng mailing list