From 1512d36220c454afc3684fbfdcd1ff68d082d361 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 13 May 2016 09:34:42 +0200 Subject: [PATCH] rjpeg_process_image should not set the texture image's width/height - that is done later --- libretro-common/formats/jpeg/rjpeg.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libretro-common/formats/jpeg/rjpeg.c b/libretro-common/formats/jpeg/rjpeg.c index 072f0a3a74..2a4a3de1ed 100644 --- a/libretro-common/formats/jpeg/rjpeg.c +++ b/libretro-common/formats/jpeg/rjpeg.c @@ -2454,8 +2454,6 @@ int rjpeg_process_image(void *data, void **buf_data, uint8_t **buf = (uint8_t**)buf_data; out_img->pixels = (uint32_t*)rjpeg_load_from_memory(*buf, size, width, height, &comp, 4); - out_img->width = *width; - out_img->height = *height; return IMAGE_PROCESS_END; } @@ -2471,6 +2469,9 @@ bool rjpeg_image_load(uint8_t *buf, void *data, size_t size, if (rjpeg_process_image(out_img, (void**)&buf, size, &width, &height) != IMAGE_PROCESS_END) return false; + out_img->width = width; + out_img->height = height; + if (r_shift == 0 && b_shift == 16) { } /* RGBA, doesn't need conversion */ else video_frame_convert_rgba_to_bgra(buf, out_img->pixels, width);