diff options
Diffstat (limited to 'src/android/camera_stream.cpp')
-rw-r--r-- | src/android/camera_stream.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/android/camera_stream.cpp b/src/android/camera_stream.cpp index ee9bbe48..c2157450 100644 --- a/src/android/camera_stream.cpp +++ b/src/android/camera_stream.cpp @@ -170,16 +170,16 @@ int CameraStream::process(Camera3RequestDescriptor::StreamBuffer *streamBuffer) ASSERT(type_ != Type::Direct); /* Handle waiting on fences on the destination buffer. */ - if (streamBuffer->fence != -1) { - int ret = waitFence(streamBuffer->fence); + if (streamBuffer->fence.isValid()) { + int ret = waitFence(streamBuffer->fence.get()); if (ret < 0) { LOG(HAL, Error) << "Failed waiting for fence: " - << streamBuffer->fence << ": " << strerror(-ret); + << streamBuffer->fence.get() << ": " + << strerror(-ret); return ret; } - ::close(streamBuffer->fence); - streamBuffer->fence = -1; + streamBuffer->fence.reset(); } const StreamConfiguration &output = configuration(); |