aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-12-06 17:35:52 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-12-06 17:35:52 +0100
commit7d90bc9f2ad0caa76d4eef8f85c8b6172c512ff6 (patch)
tree84a15b0c84de6a61b48b3cc4448a55ea62ce5928
parentfef2da6a22f200299db986fc5c2271418e816ba6 (diff)
downloadffmpeg-7d90bc9f2ad0caa76d4eef8f85c8b6172c512ff6.tar.gz
movdec: Read extended 64bit size before the debug av_log() and only when there
was enough space to read the 32bit size. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/mov.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index d96ab0488d..335ee23bed 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -315,13 +315,13 @@ static int mov_read_default(MOVContext *c, AVIOContext *pb, MOVAtom atom)
a.size = avio_rb32(pb);
a.type = avio_rl32(pb);
total_size += 8;
+ if (a.size == 1) { /* 64 bit extended size */
+ a.size = avio_rb64(pb) - 8;
+ total_size += 8;
+ }
}
av_dlog(c->fc, "type: %08x '%.4s' parent:'%.4s' sz: %"PRId64" %"PRId64" %"PRId64"\n",
a.type, (char*)&a.type, (char*)&atom.type, a.size, total_size, atom.size);
- if (a.size == 1) { /* 64 bit extended size */
- a.size = avio_rb64(pb) - 8;
- total_size += 8;
- }
if (a.size == 0) {
a.size = atom.size - total_size + 8;
if (a.size <= 8)