use FFMIN

Originally committed as revision 10848 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Baptiste Coudurier 2007-10-23 22:28:57 +00:00
parent 478638abad
commit 3d2308b0af
1 changed files with 1 additions and 2 deletions

View File

@ -181,8 +181,7 @@ static int mov_read_default(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
a.size -= 8;
if(a.size < 0)
break;
if (a.size > atom.size - total_size)
a.size = atom.size - total_size;
a.size = FFMIN(a.size, atom.size - total_size);
for (i = 0; c->parse_table[i].type != 0L
&& c->parse_table[i].type != a.type; i++)