summaryrefslogtreecommitdiff
path: root/src/android/camera_device.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/android/camera_device.cpp')
-rw-r--r--src/android/camera_device.cpp21
1 files changed, 6 insertions, 15 deletions
diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
index 80e11d4b..0bb547ae 100644
--- a/src/android/camera_device.cpp
+++ b/src/android/camera_device.cpp
@@ -802,6 +802,11 @@ void CameraDevice::abortRequest(Camera3RequestDescriptor *descriptor) const
notifyError(descriptor->frameNumber_, nullptr, CAMERA3_MSG_ERROR_REQUEST);
for (auto &buffer : descriptor->buffers_) {
+ /*
+ * Signal to the framework it has to handle fences that have not
+ * been waited on by setting the release fence to the acquire
+ * fence value.
+ */
buffer.buffer.release_fence = buffer.buffer.acquire_fence;
buffer.buffer.acquire_fence = -1;
buffer.buffer.status = CAMERA3_BUFFER_STATUS_ERROR;
@@ -1083,21 +1088,7 @@ void CameraDevice::requestComplete(Request *request)
<< " not successfully completed: "
<< request->status();
- notifyError(descriptor->frameNumber_, nullptr,
- CAMERA3_MSG_ERROR_REQUEST);
-
- for (auto &buffer : descriptor->buffers_) {
- /*
- * Signal to the framework it has to handle fences that
- * have not been waited on by setting the release fence
- * to the acquire fence value.
- */
- buffer.buffer.release_fence = buffer.buffer.acquire_fence;
- buffer.buffer.acquire_fence = -1;
- buffer.buffer.status = CAMERA3_BUFFER_STATUS_ERROR;
- }
-
- descriptor->status_ = Camera3RequestDescriptor::Status::Error;
+ abortRequest(descriptor);
sendCaptureResults();
return;