aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/aiffdec.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2023-09-12 10:56:53 +0200
committerPaul B Mahol <onemda@gmail.com>2023-09-12 19:33:17 +0200
commita18ccbfaeb16523458b15bdbfc482eb5a14f61a7 (patch)
tree231aa6ecace6e0c4e778d8f0c0f3187f6e698c39 /libavformat/aiffdec.c
parentaeff5bcba092583cb85b823bb5dbc14099591408 (diff)
downloadffmpeg-a18ccbfaeb16523458b15bdbfc482eb5a14f61a7.tar.gz
avformat/aiffdec: improve probe
Diffstat (limited to 'libavformat/aiffdec.c')
-rw-r--r--libavformat/aiffdec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c
index 1cde12c193..5314d159ef 100644
--- a/libavformat/aiffdec.c
+++ b/libavformat/aiffdec.c
@@ -202,8 +202,8 @@ static int get_aiff_header(AVFormatContext *s, int64_t size,
static int aiff_probe(const AVProbeData *p)
{
/* check file header */
- if (p->buf[0] == 'F' && p->buf[1] == 'O' &&
- p->buf[2] == 'R' && p->buf[3] == 'M' &&
+ if (AV_RL32(p->buf) == MKTAG('F', 'O', 'R', 'M') &&
+ AV_RB32(p->buf + 4) >= 4 &&
p->buf[8] == 'A' && p->buf[9] == 'I' &&
p->buf[10] == 'F' && (p->buf[11] == 'F' || p->buf[11] == 'C'))
return AVPROBE_SCORE_MAX;