summaryrefslogtreecommitdiffstats
path: root/services/camera/libcameraservice
diff options
context:
space:
mode:
authorChien-Yu Chen <cychen@google.com>2015-09-10 16:15:21 -0700
committerChien-Yu Chen <cychen@google.com>2015-09-11 14:13:47 -0700
commitb83c1fe4e793da269b9340c64f7032a9cc27809c (patch)
tree849892744754ce783d03414e7b4c3be9c5ec2bda /services/camera/libcameraservice
parenta2ab4505c807f42afe34809409c4e85d91618a8c (diff)
downloadframeworks_av-b83c1fe4e793da269b9340c64f7032a9cc27809c.zip
frameworks_av-b83c1fe4e793da269b9340c64f7032a9cc27809c.tar.gz
frameworks_av-b83c1fe4e793da269b9340c64f7032a9cc27809c.tar.bz2
Camera3Device: Signal buffer returned after it failed
Signal buffer returned even after it failed so the thread waiting for it can wake up sooner. Bug: 23981045 Change-Id: Iccbcc7ece2e0f6204da9c54f2bdd96ff6843a8f5
Diffstat (limited to 'services/camera/libcameraservice')
-rw-r--r--services/camera/libcameraservice/device3/Camera3Stream.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/services/camera/libcameraservice/device3/Camera3Stream.cpp b/services/camera/libcameraservice/device3/Camera3Stream.cpp
index 691764f..96299b3 100644
--- a/services/camera/libcameraservice/device3/Camera3Stream.cpp
+++ b/services/camera/libcameraservice/device3/Camera3Stream.cpp
@@ -487,9 +487,12 @@ status_t Camera3Stream::returnBuffer(const camera3_stream_buffer &buffer,
status_t res = returnBufferLocked(buffer, timestamp);
if (res == OK) {
fireBufferListenersLocked(buffer, /*acquired*/false, /*output*/true);
- mOutputBufferReturnedSignal.signal();
}
+ // Even if returning the buffer failed, we still want to signal whoever is waiting for the
+ // buffer to be returned.
+ mOutputBufferReturnedSignal.signal();
+
return res;
}