summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libcamera/pipeline/raspberrypi/raspberrypi.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
index f821d8fe..0bab3bed 100644
--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
@@ -1520,8 +1520,14 @@ void RPiCameraData::clearIncompleteRequests()
for (auto &b : request->buffers()) {
FrameBuffer *buffer = b.second;
- buffer->cancel();
- pipe_->completeBuffer(request, buffer);
+ /*
+ * Has the buffer already been handed back to the
+ * request? If not, do so now.
+ */
+ if (buffer->request()) {
+ buffer->cancel();
+ pipe_->completeBuffer(request, buffer);
+ }
}
pipe_->completeRequest(request);