summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo@jmondi.org>2020-06-28 18:03:32 +0200
committerJacopo Mondi <jacopo@jmondi.org>2020-06-29 09:39:56 +0200
commitd8848693bf92c15a4ce18a3ff8b43f537de5e033 (patch)
treed83c9dc16ea8caba209727d0b562cb49bc7977e5 /src
parentb7dfefb882b67757a00a4bed015c3a51f98c6ce0 (diff)
libcamera: raspberrypi: Fail on unsupported stream role
When an unsupported stream roles is requested to generateConfiguration(), the function shall fail instead of simply ignoring the request. Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/pipeline/raspberrypi/raspberrypi.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
index b3cb9323..9d887b70 100644
--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
@@ -568,7 +568,8 @@ CameraConfiguration *PipelineHandlerRPi::generateConfiguration(Camera *camera,
default:
LOG(RPI, Error) << "Requested stream role not supported: "
<< role;
- break;
+ delete config;
+ return nullptr;
}
if (rawCount > 1 || outCount > 2) {