exynos_omx: multi_thread: The case of "enable native buffer", Change the conditions...
authorSeungBeom Kim <sbcrux.kim@samsung.com>
Fri, 3 Aug 2012 21:19:12 +0000 (14:19 -0700)
committerJames Dong <jdong@google.com>
Fri, 3 Aug 2012 21:40:11 +0000 (14:40 -0700)
related-to-bug: 6923167

Change-Id: Ibdb5ad5deec3030743e99c4faff1cc20d9686f3e
Signed-off-by: SeungBeom Kim <sbcrux.kim@samsung.com>
exynos_omx/openmax/exynos_omx/osal/Exynos_OSAL_Android.cpp

index b54081c0b7fac6b9c1e8dd2d9e7dfc6045b9330e..0f2cd4931f67a821dc6c4768685e0b8cabee87dd 100644 (file)
@@ -410,15 +410,17 @@ OMX_ERRORTYPE Exynos_OSAL_SetANBParameter(
             ret = OMX_ErrorBadPortIndex;
             goto EXIT;
         }
-         /* ANB and DPB Buffer Sharing */
+
+        /* ANB and DPB Buffer Sharing */
+        pExynosPort->bIsANBEnabled = pANBParams->enable;
         if ((portIndex == OUTPUT_PORT_INDEX) &&
+            (pExynosPort->bIsANBEnabled == OMX_TRUE) &&
             ((pExynosPort->bufferProcessType & BUFFER_ANBSHARE) == BUFFER_ANBSHARE)) {
             pExynosPort->bufferProcessType = BUFFER_SHARE;
             pExynosPort->portDefinition.format.video.eColorFormat = (OMX_COLOR_FORMATTYPE)OMX_COLOR_FormatYUV420SemiPlanar;
 //            pExynosPort->portDefinition.format.video.eColorFormat = (OMX_COLOR_FORMATTYPE)OMX_SEC_COLOR_FormatNV12Tiled;
             Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "OMX_IndexParamEnableAndroidBuffers & bufferProcessType change to BUFFER_SHARE");
         }
-        pExynosPort->bIsANBEnabled = pANBParams->enable;
     }
         break;