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

Baptiste Coudurier baptiste.coudurier
Tue Aug 1 23:11:09 CEST 2006


Hi

Reimar D?ffinger wrote:
> Hello,
> I have a MXF file that currently is unplayable.
> The attached patch fixes two problems:
> 1) the mxf file contains an UMID tag with size 0. No idea if this really
> is valid, but an extra check can't really hurt IMO

File is not valid. Tags size are strictly specified in MXF specs.
Does the demuxer crash with that file ? Or just saying "error reading
metadata header" ?

I agree check can't really hurt, we must check EVERY tag then.

> 2) it doesn't have a picture essence codec tag, which according to the
> spec is fine, since it's only a D/Req (decoder requirement). So the
> attached patch falls back to selecting the codec ID via the mandatory
> essence container tag. I do not know if these tags are officially
> registered or what they really stand for.

Well, could be, I was thinking about that. Thing is container uls can
reference a video codec AND an audio codec. So I prefered to ignore
container uls for now, I mentioned it in "Principle" at the top of the file.

> [...]
> @@ -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.

> +static const MXFCodecUL mxf_container_codec_uls[] = {
> +    { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x02,0x0D,0x01,0x03,0x01,0x02,0x04,0x60,0x01 }, CODEC_ID_MPEG2VIDEO },
> +    { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x0D,0x01,0x03,0x01,0x02,0x06,0x01,0x00 }, CODEC_ID_PCM_S24LE },
> +    { { 0 }, CODEC_ID_NONE }
> +};

Same here.

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





More information about the ffmpeg-devel mailing list