[FFmpeg-devel] [PATCH] "Metal Gear Solid: The Twin Snakes" demuxer

Reimar Döffinger Reimar.Doeffinger at gmx.de
Wed Mar 21 19:42:53 CET 2012


On Wed, Mar 21, 2012 at 04:11:16PM +0000, Paul B Mahol wrote:
> +    if (memcmp(p->buf, "\x0\x0\x0\xE", 4))

I strongly dislike binary data in string constants.
Also, using AV_RB32 would be more readable anyway.

> +    return AVPROBE_SCORE_MAX / 2;

And I think it is too little to justify this
probe score.
Even more so since there's another 4 bytes directly
following that the read_header functions checks for
validity.
tools/probetest is a good idea to try.

> +    st->codec->codec_id   = ff_codec_get_id(ff_codec_bmp_tags,
> +                                           st->codec->codec_tag);

Looks like there should be one space more.

> +    if (pb->eof_reached)

You should use url_feof, so that it gets updated if the file is extended
later. Though I admit that for this format things will probably be
broken at that point already.


More information about the ffmpeg-devel mailing list