From 6edd7ab4a4a8077f36767e7047b5d2c8fa0cf488 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 Change-Id: Ie4475c8433eaad7545430f7e01e222d074180e0e --- 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 bcbe2116a..29391a15f 100644 --- a/tools/emulator/system/camera/EmulatedFakeCamera2.cpp +++ b/tools/emulator/system/camera/EmulatedFakeCamera2.cpp @@ -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();