@@ -1162,6 +1162,14 @@ int PipelineHandlerRPi::queueRequestDevice(Camera *camera, Request *request)
stream->setExternalBuffer(buffer);
}
+ if (!buffer && (stream->configuration().hints &
+ StreamConfiguration::Hint::MandatoryRequestBuffer)) {
+ LOG(RPI, Error) << "MandatoryRequestBuffer hint set for stream "
+ << stream->name()
+ << ", but no request buffer provided";
+ return -EINVAL;
+ }
+
/*
* If no buffer is provided by the request for this stream, we
* queue a nullptr to the stream to signify that it must use an
Add some validation in queueRequestDevice() to ensure that a frame buffer is provided in a Request if the MandatoryRequestBuffer flag has been set in the StreamConfiguration for every configured stream. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> --- src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 8 ++++++++ 1 file changed, 8 insertions(+)