[Ffmpeg-devel] Re: [PATCH] MXF unplayable file

Reimar Döffinger Reimar.Doeffinger
Tue Aug 1 23:55:38 CEST 2006


Hello,
On Tue, Aug 01, 2006 at 11:11:09PM +0200, Baptiste Coudurier wrote:
> > [...]
> > @@ -695,8 +699,15 @@
> >      { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x02,0x02,0x02,0x03,0x02,0x01,0x00 },        CODEC_ID_AC3 },
> >      { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x02,0x02,0x02,0x03,0x02,0x05,0x00 },        CODEC_ID_MP2 }, /* MP2 or MP3 */
> >    //{ { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x02,0x02,0x02,0x03,0x02,0x1C,0x00 },    CODEC_ID_DOLBY_E }, /* Dolby-E */
> > +    { { 0 }, CODEC_ID_NONE }
> >  };
> 
> Right, UL value needs to be 16 bytes of 0x00 though to avoid problems
> with memcmp I think.

That was a separate issue actually I must admit. You're doing
> while (uls->id != CODEC_ID_NONE)

in mxf_get_codec_id, which with the current struct will read beyond its
end I think.
Also, since the check is against the codec id, the value if UL is
irrelevant. Also the compiler must fill any not-specified parts with 0,
so the only reason to write it out are those annoying warnings gcc 4.1
spits out otherwise.
Oh, and the problem with the too-short tag is "only" a failed metadata
parsing - though it results in the file not being playable.
Btw. is there some official "tester" to "proof" this file is invalid?

Greetings,
Reimar D?ffinger




More information about the ffmpeg-devel mailing list