diff options
Diffstat (limited to 'modules/camera/Camera.cpp')
-rw-r--r-- | modules/camera/Camera.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/modules/camera/Camera.cpp b/modules/camera/Camera.cpp index 137c5f6..10464cb 100644 --- a/modules/camera/Camera.cpp +++ b/modules/camera/Camera.cpp @@ -582,14 +582,17 @@ bool Camera::isValidReprocessSettings(const camera_metadata_t* /*settings*/) int Camera::processCaptureBuffer(const camera3_stream_buffer_t *in, camera3_stream_buffer_t *out) { - int res = sync_wait(in->acquire_fence, CAMERA_SYNC_TIMEOUT); - if (res == -ETIME) { - ALOGE("%s:%d: Timeout waiting on buffer acquire fence", __func__, mId); - return res; - } else if (res) { - ALOGE("%s:%d: Error waiting on buffer acquire fence: %s(%d)", - __func__, mId, strerror(-res), res); - return res; + if (in->acquire_fence != -1) { + int res = sync_wait(in->acquire_fence, CAMERA_SYNC_TIMEOUT); + if (res == -ETIME) { + ALOGE("%s:%d: Timeout waiting on buffer acquire fence", + __func__, mId); + return res; + } else if (res) { + ALOGE("%s:%d: Error waiting on buffer acquire fence: %s(%d)", + __func__, mId, strerror(-res), res); + return res; + } } out->stream = in->stream; |