From fc8ab094473901857ee382396eebc5d52ac4c6c6 Mon Sep 17 00:00:00 2001 From: Tyler Luu Date: Wed, 26 Oct 2011 12:12:02 -0500 Subject: 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 --- camera/OMXCameraAdapter/OMXCapture.cpp | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'camera') 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) { -- cgit v1.1