Camera2: Fix a potential race condition in the readout thread

Change-Id: Ie4475c8433eaad7545430f7e01e222d074180e0e
This commit is contained in:
Igor Murashkin
2012-12-07 12:34:20 -08:00
parent 0825f8b65b
commit 6edd7ab4a4

View File

@@ -1135,6 +1135,7 @@ void EmulatedFakeCamera2::ReadoutThread::setNextOperation(
camera_metadata_t *request,
Buffers *buffers) {
Mutex::Autolock lock(mInputMutex);
Mutex::Autolock iLock(mInternalsMutex);
if ( !readyForNextCapture() ) {
ALOGE("In flight queue full, dropping captures");
mParent->signalError();