summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2021-02-06 18:22:56 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2021-02-10 21:14:47 +0100
commit941e747d665cecf78b2e0c823d71477e4db05e24 (patch)
tree64a83fd8afbd114ed1429c218a9e356d10817569 /libavformat
parentfec4a2d232d7ebf6d1084fb568d4d84844f25abc (diff)
avformat/mov: simplify size code in probing a bit
Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/mov.c5
1 files changed, 1 insertions, 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',' ')