exynos_omx: multi_thread: Add compensate the defect of dynamic resolution change.
authorSeungBeom Kim <sbcrux.kim@samsung.com>
Wed, 23 Oct 2013 04:59:49 +0000 (13:59 +0900)
committerLajos Molnar <lajos@google.com>
Wed, 4 Jun 2014 00:59:43 +0000 (17:59 -0700)
If seek position immediately after Dynamic resolution change, error occurs.
Also, the case of if send port_disable command immediately after flush, error occurs.

Bug: 11006942
Change-Id: I9db181542b84778df5609c1f4ce9bec297fe7dd1
Signed-off-by: SeungBeom Kim <sbcrux.kim@samsung.com>
exynos_omx/openmax/exynos_omx/component/video/dec/h264/Exynos_OMX_H264dec.c

index b217a1bd11e79c41478b68b0ea3b6a3e6b55333d..5af9c019f5c7b39ca4248c117ebc3163b4a1be68 100644 (file)
@@ -624,13 +624,6 @@ OMX_ERRORTYPE H264CodecReconfigAllBuffers(
             Exynos_CodecBufferReset(pExynosComponent, OUTPUT_PORT_INDEX);
             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 */
@@ -638,6 +631,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 {
@@ -1858,15 +1856,6 @@ OMX_ERRORTYPE Exynos_H264Dec_DstIn(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX_
                                         pDstInputData->buffer.multiPlaneBuffer.fd[0],
                                         pDstInputData->buffer.multiPlaneBuffer.fd[1]);
 
-    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;
-    }
-
     OMX_U32 nAllocLen[VIDEO_BUFFER_MAX_PLANES] = {0, 0, 0};
     nAllocLen[0] = pExynosOutputPort->portDefinition.format.video.nFrameWidth * pExynosOutputPort->portDefinition.format.video.nFrameHeight;
     nAllocLen[1] = pExynosOutputPort->portDefinition.format.video.nFrameWidth * pExynosOutputPort->portDefinition.format.video.nFrameHeight / 2;