[FFmpeg-cvslog] avformat/aiffdec: improve probe

Paul B Mahol git at videolan.org
Tue Sep 12 20:40:11 EEST 2023


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Tue Sep 12 10:56:53 2023 +0200| [a18ccbfaeb16523458b15bdbfc482eb5a14f61a7] | committer: Paul B Mahol

avformat/aiffdec: improve probe

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a18ccbfaeb16523458b15bdbfc482eb5a14f61a7
---

 libavformat/aiffdec.c | 4 ++--
 1 file 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;



More information about the ffmpeg-cvslog mailing list