[FFmpeg-cvslog] avformat/mov: simplify size code in probing a bit

Michael Niedermayer git at videolan.org
Wed Feb 10 22:15:06 EET 2021


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sat Feb  6 18:22:56 2021 +0100| [941e747d665cecf78b2e0c823d71477e4db05e24] | committer: Michael Niedermayer

avformat/mov: simplify size code in probing a bit

Reviewed-by: Paul B Mahol <onemda at gmail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

 libavformat/mov.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index c3aa114a78..1dbb34befb 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -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',' ')



More information about the ffmpeg-cvslog mailing list