Merge "Camera2: Fix a potential race condition in the readout thread"

This commit is contained in:
Igor Murashkin
2012-12-12 12:47:58 -08:00
committed by Android (Google) Code Review

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();