libcamera: raspberry: Fix format validation

If the pixel format gets adjusted to the default NV12 format during
validation, it gets currently ignored and the user-supplied format is
used nonetheless.

Fix it by using the adjusted pixel format.

Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
Jacopo Mondi
2022-07-15 15:52:03 +02:00
parent e9b6b36282
commit 5ef59cd190

View File

@@ -523,7 +523,7 @@ CameraConfiguration::Status RPiCameraConfiguration::validate()
}
V4L2DeviceFormat format;
format.fourcc = V4L2PixelFormat::fromPixelFormat(cfg.pixelFormat);
format.fourcc = V4L2PixelFormat::fromPixelFormat(cfgPixFmt);
format.size = cfg.size;
format.colorSpace = cfg.colorSpace;