summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZiyan <jaraidaniel@gmail.com>2016-02-06 14:03:08 +0100
committerMichael Gernoth <michael@gernoth.net>2016-02-06 06:56:28 -0800
commita70a064a8d6759faf115ef454715deba09d775df (patch)
tree938acdd453227cb40254aedada4c5e70f94b277a
parentd3699e437cf0dd3ceca9fa640dda4b691b772031 (diff)
downloadhardware_ti_omap4-a70a064a8d6759faf115ef454715deba09d775df.zip
hardware_ti_omap4-a70a064a8d6759faf115ef454715deba09d775df.tar.gz
hardware_ti_omap4-a70a064a8d6759faf115ef454715deba09d775df.tar.bz2
domx: fix up DCC data loading when USES_LEGACY_DOMX_DCC is set
The 'dcc_loaded' local static variable was never reset properly. Change-Id: Id4ceddea6153d897456e0f845f3818be5dfbae36 (cherry picked from commit 881a349f9721837f2556b6ed8214fecbf7a19f27)
-rwxr-xr-xdomx/omx_proxy_component/omx_camera/src/omx_proxy_camera.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/domx/omx_proxy_component/omx_camera/src/omx_proxy_camera.c b/domx/omx_proxy_component/omx_camera/src/omx_proxy_camera.c
index 6d78454..16b23e0 100755
--- a/domx/omx_proxy_component/omx_camera/src/omx_proxy_camera.c
+++ b/domx/omx_proxy_component/omx_camera/src/omx_proxy_camera.c
@@ -83,6 +83,7 @@ int dcc_flag = 0;
OMX_S32 dccbuf_size = 0;
/* DCC buff accessors */
MEMPLUGIN_BUFFER_ACCESSOR sDccBuffer;
+OMX_BOOL dcc_loaded = OMX_FALSE;
#endif
/* ===========================================================================*/
@@ -263,6 +264,7 @@ static OMX_ERRORTYPE ComponentPrivateDeInit(OMX_IN OMX_HANDLETYPE hComponent)
PROXY_assert(eOsalError == TIMM_OSAL_ERR_NONE,
OMX_ErrorInsufficientResources, "Mutex release failed");
}
+ dcc_loaded = OMX_FALSE;
#endif
OMX_CameraVtcFreeMemory(hComponent);
@@ -298,7 +300,6 @@ static OMX_ERRORTYPE Camera_SendCommand(OMX_IN OMX_HANDLETYPE hComponent,
{
OMX_ERRORTYPE eError = OMX_ErrorNone, eCompReturn;
#ifdef USES_LEGACY_DOMX_DCC
- static OMX_BOOL dcc_loaded = OMX_FALSE;
OMX_ERRORTYPE dcc_eError = OMX_ErrorNone;
#endif
OMX_COMPONENTTYPE *hComp = (OMX_COMPONENTTYPE *) hComponent;
@@ -548,6 +549,12 @@ OMX_ERRORTYPE OMX_ComponentInit(OMX_HANDLETYPE hComponent)
TIMM_OSAL_Malloc(sizeof(PROXY_COMPONENT_PRIVATE),
TIMM_OSAL_TRUE, 0, TIMMOSAL_MEM_SEGMENT_INT);
+#ifdef USES_LEGACY_DOMX_DCC
+ // Should not be needed as PrivateDeInit will set it, but resetting
+ // it here just in case there's some codepath that skips PrivateDeInit.
+ dcc_loaded = OMX_FALSE;
+#endif
+
pComponentPrivate =
(PROXY_COMPONENT_PRIVATE *) pHandle->pComponentPrivate;
if (pHandle->pComponentPrivate == NULL)