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

Commit 6c14e31d authored by Shuzhen Wang's avatar Shuzhen Wang
Browse files

Camera: Increase buffer count limit for prepareBuffer

During buffer preparation, the number of buffers could exceed HAL
max_buffers. Do not treat this case as error.

Test: Run testConstrainedHighSpeedRecording
Bug: 192871011
Change-Id: I23f1d372b944e7633f293262dd21f9cfdd172c54
parent 987ce105
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -654,7 +654,8 @@ status_t Camera3OutputStream::getBufferLockedCommon(ANativeWindowBuffer** anb, i
         * Then there is circular locking dependency.
         */
        sp<Surface> consumer = mConsumer;
        size_t remainingBuffers = camera_stream::max_buffers - mHandoutTotalBufferCount;
        size_t remainingBuffers = (mState == STATE_PREPARING ? mTotalBufferCount :
                                   camera_stream::max_buffers) - mHandoutTotalBufferCount;
        mLock.unlock();
        std::unique_lock<std::mutex> batchLock(mBatchLock);