summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@ideasonboard.com>2021-03-11 13:57:27 +0000
committerKieran Bingham <kieran.bingham@ideasonboard.com>2021-03-24 22:20:05 +0000
commit552ac5cfeccba4a37079533b4562358ac4a7b4f9 (patch)
tree351cf8b75504ec3260083ddfd00f060315486ae2 /src
parent597c67120e8b36a279d4eb9dccca0c16c6969fd7 (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/pipeline/ipu3/frames.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libcamera/pipeline/ipu3/frames.cpp b/src/libcamera/pipeline/ipu3/frames.cpp
index 151ebfe7..c7718fe7 100644
--- a/src/libcamera/pipeline/ipu3/frames.cpp
+++ b/src/libcamera/pipeline/ipu3/frames.cpp
@@ -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();