diff options
-rw-r--r-- | camera/OMXCameraAdapter/OMX3A.cpp | 9 | ||||
-rw-r--r-- | camera/OMXCameraAdapter/OMXFocus.cpp | 1 | ||||
-rw-r--r-- | camera/inc/OMXCameraAdapter/OMXCameraAdapter.h | 1 |
3 files changed, 8 insertions, 3 deletions
diff --git a/camera/OMXCameraAdapter/OMX3A.cpp b/camera/OMXCameraAdapter/OMX3A.cpp index 647c7a7..54e8b8f 100644 --- a/camera/OMXCameraAdapter/OMX3A.cpp +++ b/camera/OMXCameraAdapter/OMX3A.cpp @@ -396,11 +396,14 @@ status_t OMXCameraAdapter::setFocusMode(Gen3A_settings& Gen3A) return NO_INIT; } - if ( !mFocusAreas.isEmpty() ) { - focusArea = mFocusAreas.itemAt(0); - } + Mutex::Autolock lock(mFocusAreasLock); + if ( !mFocusAreas.isEmpty() ) + { + focusArea = mFocusAreas.itemAt(0); + } + } ///Face detection takes precedence over touch AF if ( mFaceDetectionRunning ) diff --git a/camera/OMXCameraAdapter/OMXFocus.cpp b/camera/OMXCameraAdapter/OMXFocus.cpp index f12b85c..ae5366b 100644 --- a/camera/OMXCameraAdapter/OMXFocus.cpp +++ b/camera/OMXCameraAdapter/OMXFocus.cpp @@ -40,6 +40,7 @@ status_t OMXCameraAdapter::setParametersFocus(const CameraParameters ¶ms, { status_t ret = NO_ERROR; const char *str = NULL; + Mutex::Autolock lock(mFocusAreasLock); LOG_FUNCTION_NAME; diff --git a/camera/inc/OMXCameraAdapter/OMXCameraAdapter.h b/camera/inc/OMXCameraAdapter/OMXCameraAdapter.h index d85bc4f..ef3d6a0 100644 --- a/camera/inc/OMXCameraAdapter/OMXCameraAdapter.h +++ b/camera/inc/OMXCameraAdapter/OMXCameraAdapter.h @@ -725,6 +725,7 @@ private: // Current Focus areas Vector< sp<CameraArea> > mFocusAreas; + mutable Mutex mFocusAreasLock; CaptureMode mCapMode; size_t mBurstFrames; |