summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTyler Luu <tluu@ti.com>2011-10-26 12:12:02 -0500
committerIliyan Malchev <malchev@google.com>2011-11-07 12:08:06 -0800
commitfc8ab094473901857ee382396eebc5d52ac4c6c6 (patch)
treebc2e3a97f774ef78d55906cc63dded37f3392a83
parenta58c483de2c8188e41fd9635042c31820d13b845 (diff)
downloadhardware_ti_omap4xxx-fc8ab094473901857ee382396eebc5d52ac4c6c6.zip
hardware_ti_omap4xxx-fc8ab094473901857ee382396eebc5d52ac4c6c6.tar.gz
hardware_ti_omap4xxx-fc8ab094473901857ee382396eebc5d52ac4c6c6.tar.bz2
CameraHal: Clean-up if mCaptureSem times out
Fix 2/3 for b/5472396. In stopImageCapture, continue cleaning up even if mCaptureSem times out. Change-Id: Idf65a488b2ce55a9d451a899df0bc76f6480647b Signed-off-by: Tyler Luu <tluu@ti.com>
-rw-r--r--camera/OMXCameraAdapter/OMXCapture.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/camera/OMXCameraAdapter/OMXCapture.cpp b/camera/OMXCameraAdapter/OMXCapture.cpp
index 379cf48..68111b8 100644
--- a/camera/OMXCameraAdapter/OMXCapture.cpp
+++ b/camera/OMXCameraAdapter/OMXCapture.cpp
@@ -915,7 +915,7 @@ status_t OMXCameraAdapter::stopImageCapture()
stopFaceDetection();
//Wait here for the capture to be done, in worst case timeout and proceed with cleanup
- ret = mCaptureSem.WaitTimeout(OMX_CAPTURE_TIMEOUT);
+ mCaptureSem.WaitTimeout(OMX_CAPTURE_TIMEOUT);
//If somethiing bad happened while we wait
if (mComponentState == OMX_StateInvalid)
@@ -924,16 +924,6 @@ status_t OMXCameraAdapter::stopImageCapture()
goto EXIT;
}
- if ( NO_ERROR != ret ) {
- ret |= RemoveEvent(mCameraAdapterParameters.mHandleComp,
- (OMX_EVENTTYPE) OMX_EventIndexSettingChanged,
- OMX_ALL,
- OMX_TI_IndexConfigShutterCallback,
- NULL);
- CAMHAL_LOGEA("Timeout expired on capture sem");
- goto EXIT;
- }
-
// Disable image capture
// Capturing command is not needed when capturing in video mode
if (mCapMode != VIDEO_MODE) {