[FFmpeg-cvslog] avcodec/pngdec: use else if instead of if for small bpp handling.

Benoit Fouet git at videolan.org
Fri Nov 14 17:19:46 CET 2014


ffmpeg | branch: master | Benoit Fouet <benoit.fouet at free.fr> | Fri Nov 14 10:17:37 2014 +0100| [24ca2ffad826cb660aa53a25cc35b2a2702ace0e] | committer: Michael Niedermayer

avcodec/pngdec: use else if instead of if for small bpp handling.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=24ca2ffad826cb660aa53a25cc35b2a2702ace0e
---

 libavcodec/pngdec.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index 776b0db..2f22ade 100644
--- a/libavcodec/pngdec.c
+++ b/libavcodec/pngdec.c
@@ -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++) {



More information about the ffmpeg-cvslog mailing list