From 0b47bdc14ef8c1dc8538620f89200bdd2803efa5 Mon Sep 17 00:00:00 2001 From: SeungBeom Kim Date: Sun, 29 Mar 2015 12:20:18 +0200 Subject: [PATCH] video_dec: Add compensate the defect of dynamic resolution change. If seek position immediately after Dynamic resolution change, error occurs. Also, the case of if send port_disable command immediately after flush, error occurs. Backported-from: hardware/samsung_sli/exynos5 Change-Id: I999f2ef12faaafea607d39986efac977355ea886 Signed-off-by: Andreas Schneider --- component/video/dec/h264/Exynos_OMX_H264dec.c | 20 +++++-------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/component/video/dec/h264/Exynos_OMX_H264dec.c b/component/video/dec/h264/Exynos_OMX_H264dec.c index 83658b0..16d2543 100644 --- a/component/video/dec/h264/Exynos_OMX_H264dec.c +++ b/component/video/dec/h264/Exynos_OMX_H264dec.c @@ -644,12 +644,6 @@ OMX_ERRORTYPE H264CodecReconfigAllBuffers( pBufferOps->Clear_RegisteredBuffer(hMFCHandle); pBufferOps->Cleanup_Buffer(hMFCHandle); - /******************************************************/ - /* V4L2 Destnation Setup for DPB Buffer Number Change */ - /******************************************************/ - H264CodecDstSetup(pOMXComponent); - - pVideoDec->bReconfigDPB = OMX_FALSE; } else if (pExynosPort->bufferProcessType & BUFFER_SHARE) { /**********************************/ /* Codec Buffer Unregister */ @@ -657,6 +651,11 @@ OMX_ERRORTYPE H264CodecReconfigAllBuffers( pBufferOps->Clear_RegisteredBuffer(hMFCHandle); pBufferOps->Cleanup_Buffer(hMFCHandle); } + /******************************************************/ + /* V4L2 Destnation Setup for DPB Buffer Number Change */ + /******************************************************/ + H264CodecDstSetup(pOMXComponent); + pVideoDec->bReconfigDPB = OMX_FALSE; Exynos_ResolutionUpdate(pOMXComponent); } else { @@ -2039,15 +2038,6 @@ OMX_ERRORTYPE Exynos_H264Dec_DstIn(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX_ pDstInputData->buffer.multiPlaneBuffer.dataBuffer[i]); } - if ((pVideoDec->bReconfigDPB == OMX_TRUE) && - (pExynosOutputPort->bufferProcessType & BUFFER_SHARE) && - (pExynosOutputPort->exceptionFlag == GENERAL_STATE)) { - ret = H264CodecDstSetup(pOMXComponent); - if (ret != OMX_ErrorNone) - goto EXIT; - pVideoDec->bReconfigDPB = OMX_FALSE; - } - codecReturn = pOutbufOps->Enqueue(hMFCHandle, (unsigned char **)pDstInputData->buffer.multiPlaneBuffer.dataBuffer, (unsigned int *)dataLen, pExynosOutputPort->nPlaneCnt, pDstInputData->bufferHeader); -- 2.20.1