summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libcamera/pipeline/vimc/vimc.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libcamera/pipeline/vimc/vimc.cpp b/src/libcamera/pipeline/vimc/vimc.cpp
index 92b30f2e..1a6b8ae2 100644
--- a/src/libcamera/pipeline/vimc/vimc.cpp
+++ b/src/libcamera/pipeline/vimc/vimc.cpp
@@ -567,6 +567,18 @@ void VimcCameraData::bufferReady(FrameBuffer *buffer)
{
Request *request = buffer->request();
+ /* If the buffer is cancelled force a complete of the whole request. */
+ if (buffer->metadata().status == FrameMetadata::FrameCancelled) {
+ for (auto it : request->buffers()) {
+ FrameBuffer *b = it.second;
+ b->cancel();
+ pipe_->completeBuffer(request, b);
+ }
+
+ pipe_->completeRequest(request);
+ return;
+ }
+
/* Record the sensor's timestamp in the request metadata. */
request->metadata().set(controls::SensorTimestamp,
buffer->metadata().timestamp);