[FFmpeg-devel] [PATCH 2/2] avformat: add demuxer for Rayman 2's APM format
Carl Eugen Hoyos
ceffmpeg at gmail.com
Tue Feb 18 08:16:23 EET 2020
> Am 18.02.2020 um 00:20 schrieb Zane van Iperen <zane at zanevaniperen.com>:
>
> So, something like this?
>
> #define APM_TAG_VS12 MKTAG('v', 's', '1', '2')
> #define APM_TAG_DATA MKTAG('D', 'A', 'T', 'A')
>
> static int apm_probe(const AVProbeData *p)
> {
> if (p->buf_size < 100)
> return 0;
>
> if (AV_RL32(p->buf + 20) != APM_TAG_VS12)
> return 0;
>
> if (AV_RL32(p->buf + 96) != APM_TAG_DATA)
> return 0;
>
> return AVPROBE_SCORE_EXTENSION + 1;
Yes but you can increase the score for 64 matching bits to MAX-1
Thank you, Carl Eugen
More information about the ffmpeg-devel
mailing list