diff options
author | Andriy Chepurnyy <x0155536@ti.com> | 2012-02-16 16:07:07 +0200 |
---|---|---|
committer | Daniel Levin <dendy@ti.com> | 2012-07-25 08:55:42 -0500 |
commit | 8ce6ba7f4186d89d6edd359088c0676c0174acad (patch) | |
tree | f6fbb056d9a96d43a4b0e92686c7783781d2f139 /camera/OMXCameraAdapter/OMXCapture.cpp | |
parent | d6f57f3f5de733f590c584cd5ddfdc43d5073cb2 (diff) | |
download | hardware_ti_omap4-8ce6ba7f4186d89d6edd359088c0676c0174acad.zip hardware_ti_omap4-8ce6ba7f4186d89d6edd359088c0676c0174acad.tar.gz hardware_ti_omap4-8ce6ba7f4186d89d6edd359088c0676c0174acad.tar.bz2 |
CameraHAL: Mutually exclusive execution of stopImageCapture/startImageCapture
stopImageCapture/startImageCapture can be run from different
threads, sometimes it leds to race condition like - shutter
callback disabled right after it enable so startImageCapture
continuosly waits on mStartCaptureSem.WaitTimeout(OMX_CAPTURE_TIMEOUT)
and exit with invalid state. This patch is possible solution
for DR OMAPS00261663.
Change-Id: Idc8b0456a246a6aab1a86b5686720e41c681d26b
Signed-off-by: Andriy Chepurnyy <x0155536@ti.com>
Diffstat (limited to 'camera/OMXCameraAdapter/OMXCapture.cpp')
-rw-r--r-- | camera/OMXCameraAdapter/OMXCapture.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/camera/OMXCameraAdapter/OMXCapture.cpp b/camera/OMXCameraAdapter/OMXCapture.cpp index bc817a2..d45edb3 100644 --- a/camera/OMXCameraAdapter/OMXCapture.cpp +++ b/camera/OMXCameraAdapter/OMXCapture.cpp @@ -753,6 +753,8 @@ status_t OMXCameraAdapter::startImageCapture(bool bracketing) LOG_FUNCTION_NAME; + Mutex::Autolock lock(mImageCaptureLock); + if(!mCaptureConfigured) { ///Image capture was cancelled before we could start @@ -930,6 +932,8 @@ status_t OMXCameraAdapter::stopImageCapture() LOG_FUNCTION_NAME; + Mutex::Autolock lock(mImageCaptureLock); + if (!mCaptureConfigured) { //Capture is not ongoing, return from here return NO_ERROR; |