From c01e59b33d93e818dfa752acd58caa66f5f2d584 Mon Sep 17 00:00:00 2001 From: michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2> Date: Sun, 30 Jun 2002 19:04:02 +0000 Subject: [PATCH] fixing rgb24tobgr32 git-svn-id: file:///var/local/repositories/mplayer/trunk/postproc@6615 b3059339-0415-0410-9bf9-f77b7e298cf2 --- rgb2rgb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rgb2rgb.c b/rgb2rgb.c index 995f888..7ab86e1 100644 --- a/rgb2rgb.c +++ b/rgb2rgb.c @@ -446,8 +446,7 @@ void rgb32tobgr15(const uint8_t *src, uint8_t *dst, unsigned int src_size) void rgb24tobgr32(const uint8_t *src, uint8_t *dst, unsigned int src_size) { unsigned i; - unsigned num_pixels = src_size >> 2; - for(i=0; i<num_pixels; i++) + for(i=0; 3*i<src_size; i++) { dst[4*i + 0] = src[3*i + 2]; dst[4*i + 1] = src[3*i + 1]; -- 2.25.4