exynos_omx: multi_thread: Fix scheme of output metadata buffer in Decode component.
authorSeungBeom Kim <sbcrux.kim@samsung.com>
Tue, 29 Oct 2013 23:40:23 +0000 (08:40 +0900)
committerLajos Molnar <lajos@google.com>
Wed, 4 Jun 2014 01:00:01 +0000 (18:00 -0700)
ION-FD reference count increase works incorrect. if using output metadata buffer in Decode component.

Bug: 10916591
Change-Id: I34241372c089339290bb43a65832a4eebd6ca86c
Signed-off-by: SeungBeom Kim <sbcrux.kim@samsung.com>
exynos_omx/openmax/exynos_omx/component/video/dec/Exynos_OMX_Vdec.c

index 726a1f9bdfd6ced3f653e06dab0eb0ff01103ef8..8a2add6f585ce435cf2148b2a5627e57a27e3865 100644 (file)
@@ -882,7 +882,11 @@ OMX_ERRORTYPE Exynos_OMX_DstInputBufferProcess(OMX_HANDLETYPE hComponent)
                                 break;
                             }
                         }
-                        Exynos_OSAL_RefANB_Increase(pVideoDec->hRefHandle, dstInputData.bufferHeader->pBuffer);
+
+                        OMX_PTR pBufferHandle = dstInputData.bufferHeader->pBuffer;
+                        if (exynosOutputPort->bStoreMetaData == OMX_TRUE)
+                            Exynos_OSAL_GetInfoFromMetaData(dstInputData.bufferHeader->pBuffer, &pBufferHandle);
+                        Exynos_OSAL_RefANB_Increase(pVideoDec->hRefHandle, pBufferHandle);
                         Exynos_ResetDataBuffer(dstInputUseBuffer);
                     }
                 }