From b7d73ebc93cd12629d2b4fca66f914fd4edc5715 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 14 Mar 2015 01:58:50 +0100 Subject: [PATCH] (RPNG) More cleanups to png_reverse_filter_loop --- libretro-common/formats/png/rpng_decode.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/libretro-common/formats/png/rpng_decode.c b/libretro-common/formats/png/rpng_decode.c index 18abab3feb..c98c3823f2 100644 --- a/libretro-common/formats/png/rpng_decode.c +++ b/libretro-common/formats/png/rpng_decode.c @@ -593,20 +593,15 @@ bool png_reverse_filter_loop(struct rpng_t *rpng, uint32_t **data) { int ret = 0; - const struct png_ihdr *ihdr = NULL; - struct rpng_process_t *pngp = NULL; if (!rpng) return false; - ihdr = &rpng->ihdr; - pngp = &rpng->process; - - if (!ihdr || !pngp) - return false; - do { + const struct png_ihdr *ihdr = &rpng->ihdr; + struct rpng_process_t *pngp = &rpng->process; + if (ihdr->interlace) ret = png_reverse_filter_adam7(data, ihdr, pngp); else