diff options
author | Jacopo Mondi <jacopo@jmondi.org> | 2020-07-07 11:39:52 +0200 |
---|---|---|
committer | Jacopo Mondi <jacopo@jmondi.org> | 2020-08-03 11:16:16 +0200 |
commit | d181856edc7f26a1108072bd024af74c082ac729 (patch) | |
tree | 5b4d082ec91e9433cd34e8d2e7b86824a9739ea5 /src | |
parent | ed98a81fc3d7b2c0e6f5d8c487a888e69404161c (diff) |
libcamera: ipu3: Make sure the config is valid
Inspect the return status of validate() in the IPU3 pipeline handler
generateConfigurtion() implementation. If the generated configuration is
not valid, return a an empty configuration to the application.
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/libcamera/pipeline/ipu3/ipu3.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp index b1f804d6..f2d76551 100644 --- a/src/libcamera/pipeline/ipu3/ipu3.cpp +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp @@ -363,7 +363,8 @@ CameraConfiguration *PipelineHandlerIPU3::generateConfiguration(Camera *camera, config->addConfiguration(cfg); } - config->validate(); + if (config->validate() == CameraConfiguration::Invalid) + return {}; return config; } |