avcodec/pngdec: use else if instead of if for small bpp handling.
authorBenoit Fouet <benoit.fouet@free.fr>
Fri, 14 Nov 2014 09:17:37 +0000 (10:17 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 14 Nov 2014 16:12:39 +0000 (17:12 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/pngdec.c

index 776b0db..2f22ade 100644 (file)
@@ -840,8 +840,7 @@ exit_loop:
             }
             pd += s->image_linesize;
         }
-    }
-    if (s->bits_per_pixel == 2){
+    } else if (s->bits_per_pixel == 2) {
         int i, j;
         uint8_t *pd = p->data[0];
         for (j = 0; j < s->height; j++) {
@@ -869,8 +868,7 @@ exit_loop:
             }
             pd += s->image_linesize;
         }
-    }
-    if (s->bits_per_pixel == 4){
+    } else if (s->bits_per_pixel == 4) {
         int i, j;
         uint8_t *pd = p->data[0];
         for (j = 0; j < s->height; j++) {