# HG changeset patch # User bcoudurier # Date 1193063774 0 # Node ID 022174d849d5614bf4a86ee1f1574984331170c3 # Parent 883daa175be19f0c5182a2294460e0ba244ab46d 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. diff -r 883daa175be1 -r 022174d849d5 mov.c --- a/mov.c Mon Oct 22 06:01:38 2007 +0000 +++ b/mov.c Mon Oct 22 14:36:14 2007 +0000 @@ -179,8 +179,10 @@ break; } a.size -= 8; - if(a.size < 0 || a.size > atom.size - total_size) + if(a.size < 0) break; + if (a.size > atom.size - total_size) + a.size = atom.size - total_size; for (i = 0; c->parse_table[i].type != 0L && c->parse_table[i].type != a.type; i++)