summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo@jmondi.org>2022-07-15 15:52:03 +0200
committerJacopo Mondi <jacopo@jmondi.org>2022-07-18 10:00:52 +0200
commit5ef59cd190e2193ac799cb9c3564dd7a484c1239 (patch)
tree0156156bcc57946b8089ff19be35f7b847a8621e
parente9b6b362820338d0546563444e7b1767f5c7044c (diff)
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>
-rw-r--r--src/libcamera/pipeline/raspberrypi/raspberrypi.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
index fdc24cd5..8c881303 100644
--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
@@ -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;