libv4l1: When asked for RGB, return RGB and not BGR Signed-off-by: Marc Deslauriers <marc.deslauriers@xxxxxxxxxx> --- lib/libv4l1/libv4l1.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/libv4l1/libv4l1.c b/lib/libv4l1/libv4l1.c index cb53899..202f020 100644 --- a/lib/libv4l1/libv4l1.c +++ b/lib/libv4l1/libv4l1.c @@ -87,9 +87,9 @@ static unsigned int palette_to_pixelformat(unsigned int palette) case VIDEO_PALETTE_RGB565: return V4L2_PIX_FMT_RGB565; case VIDEO_PALETTE_RGB24: - return V4L2_PIX_FMT_BGR24; + return V4L2_PIX_FMT_RGB24; case VIDEO_PALETTE_RGB32: - return V4L2_PIX_FMT_BGR32; + return V4L2_PIX_FMT_RGB32; case VIDEO_PALETTE_YUYV: return V4L2_PIX_FMT_YUYV; case VIDEO_PALETTE_YUV422: @@ -118,9 +118,9 @@ static unsigned int pixelformat_to_palette(unsigned int pixelformat) return VIDEO_PALETTE_RGB555; case V4L2_PIX_FMT_RGB565: return VIDEO_PALETTE_RGB565; - case V4L2_PIX_FMT_BGR24: + case V4L2_PIX_FMT_RGB24: return VIDEO_PALETTE_RGB24; - case V4L2_PIX_FMT_BGR32: + case V4L2_PIX_FMT_RGB32: return VIDEO_PALETTE_RGB32; case V4L2_PIX_FMT_YUYV: return VIDEO_PALETTE_YUYV; -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html