OSDN Git Service

use FFMIN
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>
Tue, 23 Oct 2007 22:28:57 +0000 (22:28 +0000)
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>
Tue, 23 Oct 2007 22:28:57 +0000 (22:28 +0000)
Originally committed as revision 10848 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/mov.c

index 0ce6320..0972f73 100644 (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++)