ffmpeg | branch: master | Michael Niedermayer <[email protected]> | Sat 
Feb  6 18:22:55 2021 +0100| [fec4a2d232d7ebf6d1084fb568d4d84844f25abc] | 
committer: Michael Niedermayer

avformat/mov: Support size = 1 and size = 0 special cases in probing

Signed-off-by: Michael Niedermayer <[email protected]>

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

 libavformat/mov.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index dfe9be40a9..c3aa114a78 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -7117,6 +7117,11 @@ static int mov_probe(const AVProbeData *p)
         if ((offset + 8) > (unsigned int)p->buf_size)
             break;
         size = AV_RB32(p->buf + offset);
+        if (size == 1 && offset + 16 > (unsigned int)p->buf_size) {
+            size = AV_RB64(p->buf+offset + 8);
+        } else if (size == 0) {
+            size = p->buf_size - offset;
+        }
         tag = AV_RL32(p->buf + offset + 4);
         switch(tag) {
         /* check for obvious tags */

_______________________________________________
ffmpeg-cvslog mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

Reply via email to