[FFmpeg-cvslog] movdec: Fix bad computed size for atoms with size 0 in MOV files

Mihnea Balta git at videolan.org
Tue Dec 6 17:49:50 CET 2011


ffmpeg | branch: master | Mihnea Balta <mihnea.balta at gmail.com> | Tue Dec  6 09:29:47 2011 +0200| [fef2da6a22f200299db986fc5c2271418e816ba6] | committer: Michael Niedermayer

movdec: Fix bad computed size for atoms with size 0 in MOV files

The computed size doesn't contain the header size because it's already
skipped by incrementing total_size, but then it's skipped again in the
last line. The atom comes out 8 bytes short and the function
mov_read_chan() aborts the whole parsing process. I think the computed
size should be atom.size - total_size + 8.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavformat/mov.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index eb31592..d96ab04 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -323,7 +323,7 @@ static int mov_read_default(MOVContext *c, AVIOContext *pb, MOVAtom atom)
             total_size += 8;
         }
         if (a.size == 0) {
-            a.size = atom.size - total_size;
+            a.size = atom.size - total_size + 8;
             if (a.size <= 8)
                 break;
         }



More information about the ffmpeg-cvslog mailing list