Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 27fdaaaa authored by daisuke jinno's avatar daisuke jinno Committed by Henrik Baard
Browse files

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
parent 7725022e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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