diff options
author | Emilian Peev <epeev@mm-sol.com> | 2012-02-02 15:34:53 +0200 |
---|---|---|
committer | Wu-cheng Li <wuchengli@google.com> | 2012-02-11 02:52:05 +0800 |
commit | c1b78765729c878af2016c05e6a036e688191f95 (patch) | |
tree | d331e8e34067dbf94c745c2802a2d62ba6c6feef /camera | |
parent | 057f4fd59ec05ded909e9eb9a3363d9ea345b0ca (diff) | |
download | hardware_ti_omap4xxx-c1b78765729c878af2016c05e6a036e688191f95.zip hardware_ti_omap4xxx-c1b78765729c878af2016c05e6a036e688191f95.tar.gz hardware_ti_omap4xxx-c1b78765729c878af2016c05e6a036e688191f95.tar.bz2 |
CameraHal: Avoid possible segfaults in 'setExtraData()'
- There is a chance that the OMX component could get released
while 'startImageCapture()' is still waiting for the shutter
callback. In this case we should omit the extra data
configuration.
- Should fix bug: 5911295
Change-Id: I82344573e56d7b58f119f68905e2fa1eaa3d69fe
Signed-off-by: Emilian Peev <epeev@mm-sol.com>
Diffstat (limited to 'camera')
-rwxr-xr-x | camera/OMXCameraAdapter/OMXCameraAdapter.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/camera/OMXCameraAdapter/OMXCameraAdapter.cpp b/camera/OMXCameraAdapter/OMXCameraAdapter.cpp index 3d07d5e..eb4fa00 100755 --- a/camera/OMXCameraAdapter/OMXCameraAdapter.cpp +++ b/camera/OMXCameraAdapter/OMXCameraAdapter.cpp @@ -3404,7 +3404,8 @@ status_t OMXCameraAdapter::setExtraData(bool enable, OMX_U32 nPortIndex, OMX_EXT LOG_FUNCTION_NAME; - if (OMX_StateInvalid == mComponentState) { + if ( ( OMX_StateInvalid == mComponentState ) || + ( NULL == mCameraAdapterParameters.mHandleComp ) ) { CAMHAL_LOGEA("OMX component is in invalid state"); return -EINVAL; } |