From 74d45ce6f3706ec41f4818ef0886052f3564a9cf Mon Sep 17 00:00:00 2001 From: Igor Murashkin Date: Fri, 7 Dec 2012 12:34:20 -0800 Subject: [PATCH] Camera2: Fix a potential race condition in the readout thread: DO NOT MERGE Change-Id: I12d960debb499795487582655243e951b15947d5 --- tools/emulator/system/camera/EmulatedFakeCamera2.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/emulator/system/camera/EmulatedFakeCamera2.cpp b/tools/emulator/system/camera/EmulatedFakeCamera2.cpp index 426f6731d..52ae2493d 100644 --- a/tools/emulator/system/camera/EmulatedFakeCamera2.cpp +++ b/tools/emulator/system/camera/EmulatedFakeCamera2.cpp @@ -1136,6 +1136,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();