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

Commit 2db70a94 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Camera: Signal when all Hal requested buffers return"

parents 1e32cdf3 bbf5959d
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1494,7 +1494,7 @@ Return<void> CameraHidlTest::DeviceCb::returnStreamBuffers(
        ADD_FAILURE();
    }

    std::lock_guard<std::mutex> l(mLock);
    std::unique_lock<std::mutex> l(mLock);
    for (const auto& buf : buffers) {
        bool found = false;
        for (size_t idx = 0; idx < mOutstandingBufferIds.size(); idx++) {
@@ -1514,6 +1514,10 @@ Return<void> CameraHidlTest::DeviceCb::returnStreamBuffers(
        ALOGE("%s: unknown buffer ID %" PRIu64, __FUNCTION__, buf.bufferId);
        ADD_FAILURE();
    }
    if (!hasOutstandingBuffersLocked()) {
        l.unlock();
        mFlushedCondition.notify_one();
    }
    return Void();
}