avformat/aiffdec: improve probe
This commit is contained in:
parent
aeff5bcba0
commit
a18ccbfaeb
@ -202,8 +202,8 @@ static int get_aiff_header(AVFormatContext *s, int64_t size,
|
|||||||
static int aiff_probe(const AVProbeData *p)
|
static int aiff_probe(const AVProbeData *p)
|
||||||
{
|
{
|
||||||
/* check file header */
|
/* check file header */
|
||||||
if (p->buf[0] == 'F' && p->buf[1] == 'O' &&
|
if (AV_RL32(p->buf) == MKTAG('F', 'O', 'R', 'M') &&
|
||||||
p->buf[2] == 'R' && p->buf[3] == 'M' &&
|
AV_RB32(p->buf + 4) >= 4 &&
|
||||||
p->buf[8] == 'A' && p->buf[9] == 'I' &&
|
p->buf[8] == 'A' && p->buf[9] == 'I' &&
|
||||||
p->buf[10] == 'F' && (p->buf[11] == 'F' || p->buf[11] == 'C'))
|
p->buf[10] == 'F' && (p->buf[11] == 'F' || p->buf[11] == 'C'))
|
||||||
return AVPROBE_SCORE_MAX;
|
return AVPROBE_SCORE_MAX;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user