diff --git a/samples/drivers/video/capture/src/main.c b/samples/drivers/video/capture/src/main.c index 31104928449..aafa70d29a2 100644 --- a/samples/drivers/video/capture/src/main.c +++ b/samples/drivers/video/capture/src/main.c @@ -36,10 +36,14 @@ static inline int display_setup(const struct device *const display_dev, const ui /* Set display pixel format to match the one in use by the camera */ switch (pixfmt) { case VIDEO_PIX_FMT_RGB565: - ret = display_set_pixel_format(display_dev, PIXEL_FORMAT_RGB_565); + if (capabilities.current_pixel_format != PIXEL_FORMAT_BGR_565) { + ret = display_set_pixel_format(display_dev, PIXEL_FORMAT_BGR_565); + } break; case VIDEO_PIX_FMT_XRGB32: - ret = display_set_pixel_format(display_dev, PIXEL_FORMAT_ARGB_8888); + if (capabilities.current_pixel_format != PIXEL_FORMAT_ARGB_8888) { + ret = display_set_pixel_format(display_dev, PIXEL_FORMAT_ARGB_8888); + } break; default: return -ENOTSUP;