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

Commit b83c1fe4 authored by Chien-Yu Chen's avatar Chien-Yu Chen
Browse files

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
parent a2ab4505
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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;
}