osal: changed a condition check in case of OMX_IndexParamEnableAndroidBuffers.
authorTaehwan Kim <t_h.kim@samsung.com>
Wed, 21 Nov 2012 07:06:55 +0000 (07:06 +0000)
committerTaehwan Kim <t_h.kim@samsung.com>
Thu, 22 Nov 2012 09:06:59 +0000 (09:06 +0000)
It is possible to use NON-ANB, even if OMX_IndexParamEnableAndroidBuffers.
changed a condition check in case of above.

Change-Id: I2197a71df7194a85ae693cd8fb2222e651113dcc
Signed-off-by: Taehwan Kim <t_h.kim@samsung.com>
osal/Exynos_OSAL_Android.cpp

index 42d1284c6dafbe163b57f36dc5387266ad9c93f2..ccbcaa243155fc442310a1b4fd8b348596b9d941 100644 (file)
@@ -434,9 +434,13 @@ OMX_ERRORTYPE Exynos_OSAL_SetANBParameter(
             ret = OMX_ErrorBadPortIndex;
             goto EXIT;
         }
+
+        pExynosPort->bIsANBEnabled = pANBParams->enable;
+
 #ifdef USE_ANB_OUTBUF_SHARE
          /* ANB and DPB Buffer Sharing */
         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_SEC_COLOR_FormatNV12Tiled;
@@ -449,7 +453,6 @@ OMX_ERRORTYPE Exynos_OSAL_SetANBParameter(
             pExynosPort->portDefinition.format.video.eColorFormat = OMX_COLOR_FormatYUV420SemiPlanar;
         }
 #endif
-        pExynosPort->bIsANBEnabled = pANBParams->enable;
     }
         break;