video_dec: Add compensate the defect of dynamic resolution change.
authorSeungBeom Kim <sbcrux.kim@samsung.com>
Sun, 29 Mar 2015 10:20:18 +0000 (12:20 +0200)
committerGerrit Code Review <gerrit@cyanogenmod.org>
Tue, 31 Mar 2015 17:19:13 +0000 (17:19 +0000)
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 <asn@cryptomilk.org>
component/video/dec/h264/Exynos_OMX_H264dec.c

index 83658b0aec1f3feaa1843c64e90525472cbf8f74..16d2543d0cd0b972cac7a72904278cbfb1963769 100644 (file)
@@ -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);