Merge "Camera2: Fix a potential race condition in the readout thread: DO NOT MERGE" into jb-mr1-aah-dev

This commit is contained in:
Igor Murashkin
2013-01-10 13:34:27 -08:00
committed by Android (Google) Code Review

View File

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