cinepak: simplify, use FFMIN()
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 16 Nov 2011 16:15:15 +0000 (17:15 +0100)
committerMartin Storsjö <martin@martin.st>
Fri, 18 Nov 2011 09:36:05 +0000 (11:36 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Martin Storsjö <martin@martin.st>
libavcodec/cinepak.c

index 0dbdeab..c6edfe6 100644 (file)
@@ -357,8 +357,7 @@ static int cinepak_decode (CinepakContext *s)
 
     s->data += 10 + s->sega_film_skip_bytes;
 
-    if (num_strips > MAX_STRIPS)
-        num_strips = MAX_STRIPS;
+    num_strips = FFMIN(num_strips, MAX_STRIPS);
 
     for (i=0; i < num_strips; i++) {
         if ((s->data + 12) > eod)