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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user