aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorThierry Foucu <tfoucu@gmail.com>2013-07-11 14:37:59 -0700
committerMichael Niedermayer <michaelni@gmx.at>2013-07-12 02:41:34 +0200
commit38ce775eead70b84272ee4ba908b6db3516e7cbd (patch)
tree58b02e45c368cc0a16c302472a40cac4719353b6 /libavformat
parent0fff7f039c148a91dde41772d2dc26dd0efb5f89 (diff)
downloadffmpeg-38ce775eead70b84272ee4ba908b6db3516e7cbd.tar.gz
libavformat/mov.c: Skipped duplicated MOOV atom
This should fix ticket 1378 If we have parsed a moov atom, and found another one, just skip it. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/mov.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 9c6ad99d90..a9ca1c4bf7 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -785,6 +785,12 @@ static int mov_read_moov(MOVContext *c, AVIOContext *pb, MOVAtom atom)
{
int ret;
+ if (c->found_moov) {
+ av_log(c->fc, AV_LOG_WARNING, "Found duplicated MOOV Atom. Skipped it\n");
+ avio_skip(pb, atom.size);
+ return 0;
+ }
+
if ((ret = mov_read_default(c, pb, atom)) < 0)
return ret;
/* we parsed the 'moov' atom, we can terminate the parsing as soon as we find the 'mdat' */