From d6f88804f0c3d5a59aaa9cca9ff546ce2e1396ed Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Sat, 19 Jul 2014 09:18:35 +0200 Subject: [PATCH] libv4lconvert: fix RGB32 conversion The RGB32 formats start with an alpha byte in memory. So before calling the v4lconvert_rgb32_to_rgb24 or v4lconvert_rgb24_to_yuv420 function skip that initial alpha byte so the src pointer is aligned with the first color component, since that is what those functions expect. Signed-off-by: Hans Verkuil Acked-by: Hans de Goede --- lib/libv4lconvert/libv4lconvert.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libv4lconvert/libv4lconvert.c b/lib/libv4lconvert/libv4lconvert.c index cea65aa..e4aa54a 100644 --- a/lib/libv4lconvert/libv4lconvert.c +++ b/lib/libv4lconvert/libv4lconvert.c @@ -1132,6 +1132,7 @@ static int v4lconvert_convert_pixfmt(struct v4lconvert_data *data, errno = EPIPE; result = -1; } + src++; switch (dest_pix_fmt) { case V4L2_PIX_FMT_RGB24: v4lconvert_rgb32_to_rgb24(src, dest, width, height, 0); -- 2.7.4