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>
This commit is contained in:
Jacopo Mondi 2020-06-28 18:03:32 +02:00
parent b7dfefb882
commit d8848693bf

View file

@ -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) {