]> git.sesse.net Git - ffmpeg/commitdiff
avformat/mov: simplify size code in probing a bit
authorMichael Niedermayer <michael@niedermayer.cc>
Sat, 6 Feb 2021 17:22:56 +0000 (18:22 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Wed, 10 Feb 2021 20:14:47 +0000 (21:14 +0100)
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/mov.c

index c3aa114a789c39058f69a656006772b16a6657df..1dbb34befb232a76e00a9ed6d6240830d923827c 100644 (file)
@@ -7131,10 +7131,7 @@ static int mov_probe(const AVProbeData *p)
         case MKTAG('p','n','o','t'): /* detect movs with preview pics like ew.mov and april.mov */
         case MKTAG('u','d','t','a'): /* Packet Video PVAuthor adds this and a lot of more junk */
         case MKTAG('f','t','y','p'):
-            if (size < 8 &&
-                (size != 1 ||
-                 offset + 12 > (unsigned int)p->buf_size ||
-                 AV_RB64(p->buf+offset + 8) == 0)) {
+            if (size < 8) {
                 score = FFMAX(score, AVPROBE_SCORE_EXTENSION);
             } else if (tag == MKTAG('f','t','y','p') &&
                        (   AV_RL32(p->buf + offset + 8) == MKTAG('j','p','2',' ')