Commit 4ebbecfd authored by bcoudurier's avatar bcoudurier

fix issue 225, instead of stoping when wrong atom size is found,

limit atom size to what is left, assuming container atom has correct size..
cricket4.3g2 has incorrect moov atom size which indicates that file size should be
2 bytes bigger than it is and quicktime reads it correctly though.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@10836 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent fac25e64
...@@ -179,8 +179,10 @@ static int mov_read_default(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom) ...@@ -179,8 +179,10 @@ static int mov_read_default(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
break; break;
} }
a.size -= 8; a.size -= 8;
if(a.size < 0 || a.size > atom.size - total_size) if(a.size < 0)
break; break;
if (a.size > atom.size - total_size)
a.size = atom.size - total_size;
for (i = 0; c->parse_table[i].type != 0L for (i = 0; c->parse_table[i].type != 0L
&& c->parse_table[i].type != a.type; i++) && c->parse_table[i].type != a.type; i++)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment