Add buffer index reset scheme when the Dynamic Resolution Change with dynamic DPB Change working.
Bug:
10916591
Change-Id: I897c81beb2d0c8a83399e0d1e1d5c4658d9bb00c
Signed-off-by: SeungBeom Kim <sbcrux.kim@samsung.com>
pInbufOps = pH264Dec->hMFCH264Handle.pInbufOps;
pOutbufOps = pH264Dec->hMFCH264Handle.pOutbufOps;
- if ((nPortIndex == INPUT_PORT_INDEX) && (pInbufOps != NULL))
+ if ((nPortIndex == INPUT_PORT_INDEX) && (pInbufOps != NULL)) {
pInbufOps->Stop(hMFCHandle);
- else if ((nPortIndex == OUTPUT_PORT_INDEX) && (pOutbufOps != NULL))
+ } else if ((nPortIndex == OUTPUT_PORT_INDEX) && (pOutbufOps != NULL)) {
+ EXYNOS_OMX_BASECOMPONENT *pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
+ EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
pOutbufOps->Stop(hMFCHandle);
-
+ if (pExynosOutputPort->bufferProcessType == BUFFER_SHARE)
+ pOutbufOps->Clear_RegisteredBuffer(hMFCHandle);
+ }
ret = OMX_ErrorNone;
EXIT:
pInbufOps = pMpeg4Dec->hMFCMpeg4Handle.pInbufOps;
pOutbufOps = pMpeg4Dec->hMFCMpeg4Handle.pOutbufOps;
- if ((nPortIndex == INPUT_PORT_INDEX) && (pInbufOps != NULL))
+ if ((nPortIndex == INPUT_PORT_INDEX) && (pInbufOps != NULL)) {
pInbufOps->Stop(hMFCHandle);
- else if ((nPortIndex == OUTPUT_PORT_INDEX) && (pOutbufOps != NULL))
+ } else if ((nPortIndex == OUTPUT_PORT_INDEX) && (pOutbufOps != NULL)) {
+ EXYNOS_OMX_BASECOMPONENT *pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
+ EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
pOutbufOps->Stop(hMFCHandle);
-
+ if (pExynosOutputPort->bufferProcessType == BUFFER_SHARE)
+ pOutbufOps->Clear_RegisteredBuffer(hMFCHandle);
+ }
ret = OMX_ErrorNone;
EXIT:
pInbufOps = pVp8Dec->hMFCVp8Handle.pInbufOps;
pOutbufOps = pVp8Dec->hMFCVp8Handle.pOutbufOps;
- if ((nPortIndex == INPUT_PORT_INDEX) && (pInbufOps != NULL))
+ if ((nPortIndex == INPUT_PORT_INDEX) && (pInbufOps != NULL)) {
pInbufOps->Stop(hMFCHandle);
- else if ((nPortIndex == OUTPUT_PORT_INDEX) && (pOutbufOps != NULL))
+ } else if ((nPortIndex == OUTPUT_PORT_INDEX) && (pOutbufOps != NULL)) {
+ EXYNOS_OMX_BASECOMPONENT *pExynosComponent = (EXYNOS_OMX_BASECOMPONENT *)pOMXComponent->pComponentPrivate;
+ EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
pOutbufOps->Stop(hMFCHandle);
-
+ if (pExynosOutputPort->bufferProcessType == BUFFER_SHARE)
+ pOutbufOps->Clear_RegisteredBuffer(hMFCHandle);
+ }
ret = OMX_ErrorNone;
EXIT: