summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authordaisuke jinno <daisuke.x.jinno@sonymobile.com>2015-04-22 15:28:12 +0900
committerEino-Ville Talvala <etalvala@google.com>2015-04-28 10:49:19 -0700
commit27b0159fa29b85b63f7bcad83bd13c70355a7bcd (patch)
tree0be4e3147ec03f3f5a49b4f9ec952f619f41ae74 /services
parentdae24729d0b3ced8c4a7d7f9b631e852f564db4f (diff)
downloadframeworks_av-27b0159fa29b85b63f7bcad83bd13c70355a7bcd.zip
frameworks_av-27b0159fa29b85b63f7bcad83bd13c70355a7bcd.tar.gz
frameworks_av-27b0159fa29b85b63f7bcad83bd13c70355a7bcd.tar.bz2
DO NOT MERGE: The preview frame data is broken when sending via Binder
[Cause] CallbackProcessor uses always same buffer to send preview data. A buffer is written before it is read by user process. [Solution] Increment buffer index correctly. Change-Id: I87a7e3dc6546448a419c96aa58ace3b7d086bf70
Diffstat (limited to 'services')
-rw-r--r--services/camera/libcameraservice/api1/client2/CallbackProcessor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/camera/libcameraservice/api1/client2/CallbackProcessor.cpp b/services/camera/libcameraservice/api1/client2/CallbackProcessor.cpp
index 5c8f750..88c5811 100644
--- a/services/camera/libcameraservice/api1/client2/CallbackProcessor.cpp
+++ b/services/camera/libcameraservice/api1/client2/CallbackProcessor.cpp
@@ -395,7 +395,7 @@ status_t CallbackProcessor::processNewCallback(sp<Camera2Client> &client) {
heapIdx = mCallbackHeapHead;
- mCallbackHeapHead = (mCallbackHeapHead + 1) & kCallbackHeapCount;
+ mCallbackHeapHead = (mCallbackHeapHead + 1) % kCallbackHeapCount;
mCallbackHeapFree--;
// TODO: Get rid of this copy by passing the gralloc queue all the way