Commit b5708352 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/ape: check version in probe

Fixes probetest failure
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent bc273095
......@@ -86,10 +86,14 @@ typedef struct {
static int ape_probe(AVProbeData * p)
{
if (p->buf[0] == 'M' && p->buf[1] == 'A' && p->buf[2] == 'C' && p->buf[3] == ' ')
return AVPROBE_SCORE_MAX;
int version = AV_RL16(p->buf+4);
if (AV_RL32(p->buf) != MKTAG('M', 'A', 'C', ' '))
return 0;
return 0;
if (version < APE_MIN_VERSION || version > APE_MAX_VERSION)
return AVPROBE_SCORE_MAX/4;
return AVPROBE_SCORE_MAX;
}
static void ape_dumpinfo(AVFormatContext * s, APEContext * ape_ctx)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment