diff options
author | Jacopo Mondi <jacopo@jmondi.org> | 2020-06-28 18:03:32 +0200 |
---|---|---|
committer | Jacopo Mondi <jacopo@jmondi.org> | 2020-06-29 09:39:56 +0200 |
commit | d8848693bf92c15a4ce18a3ff8b43f537de5e033 (patch) | |
tree | d83c9dc16ea8caba209727d0b562cb49bc7977e5 /src | |
parent | b7dfefb882b67757a00a4bed015c3a51f98c6ce0 (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.cpp | 3 |
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) { |