diff options
author | Tyler Luu <tluu@ti.com> | 2011-08-10 18:39:31 -0500 |
---|---|---|
committer | Iliyan Malchev <malchev@google.com> | 2011-08-11 11:12:10 -0700 |
commit | ce8e32eddf46a966b6f637c30ad0c464631c1d86 (patch) | |
tree | 69e3dd15e4bda0082294daf315577b64d28a40b2 | |
parent | 226b496d5cce18e5898383bf479fdd42f2b5abdb (diff) | |
download | hardware_ti_omap4xxx-ce8e32eddf46a966b6f637c30ad0c464631c1d86.zip hardware_ti_omap4xxx-ce8e32eddf46a966b6f637c30ad0c464631c1d86.tar.gz hardware_ti_omap4xxx-ce8e32eddf46a966b6f637c30ad0c464631c1d86.tar.bz2 |
CameraHal: Prevent issue when free/aqcuire handle
There could be a potential issue if a CameraHal instance
tries to acquire an OMX Camera handle while another instance
is freeing it.
Change-Id: I33e4c679efc11561ceca3aee217952939bfad6b7
-rw-r--r-- | camera/OMXCameraAdapter/OMXCameraAdapter.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/camera/OMXCameraAdapter/OMXCameraAdapter.cpp b/camera/OMXCameraAdapter/OMXCameraAdapter.cpp index 9c98d3e..676d04a 100644 --- a/camera/OMXCameraAdapter/OMXCameraAdapter.cpp +++ b/camera/OMXCameraAdapter/OMXCameraAdapter.cpp @@ -3059,6 +3059,8 @@ OMXCameraAdapter::~OMXCameraAdapter() { LOG_FUNCTION_NAME; + Mutex::Autolock lock(gAdapterLock); + //Return to OMX Loaded state switchToLoaded(); |