diff mbox series

[FFmpeg-devel,3/8] avformat/mov: simplify size code in probing a bit

Message ID 20210206172301.11769-3-michael@niedermayer.cc
State Accepted
Headers show
Series [FFmpeg-devel,1/8] avformat/mov: factor size out of probe code | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Michael Niedermayer Feb. 6, 2021, 5:22 p.m. UTC
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavformat/mov.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Comments

Paul B Mahol Feb. 6, 2021, 10:06 p.m. UTC | #1
LGTM
Michael Niedermayer Feb. 10, 2021, 5:56 p.m. UTC | #2
On Sat, Feb 06, 2021 at 11:06:47PM +0100, Paul B Mahol wrote:
> LGTM

will apply

thx

{...]
diff mbox series

Patch

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 70f76caff5..8504e97831 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -7127,10 +7127,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',' ')