libcamera: pipeline: ipu3: frames: Group FrameBuffer operations

Ensure that checks on resource availability are handled first, and then
operate on the queues only after the resources are confirmed as
available.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
Kieran Bingham
2021-03-11 13:57:27 +00:00
parent 597c67120e
commit 552ac5cfec
+2 -1
View File
@@ -49,12 +49,13 @@ IPU3Frames::Info *IPU3Frames::create(Request *request)
LOG(IPU3, Error) << "Parameters buffer underrun";
return nullptr;
}
FrameBuffer *paramBuffer = availableParamBuffers_.front();
if (availableStatBuffers_.empty()) {
LOG(IPU3, Error) << "Statistics buffer underrun";
return nullptr;
}
FrameBuffer *paramBuffer = availableParamBuffers_.front();
FrameBuffer *statBuffer = availableStatBuffers_.front();
availableParamBuffers_.pop();