From 8bb5dc34cbb760a9b2bf65147b7f7f430b40e23a Mon Sep 17 00:00:00 2001 From: SeungBeom Kim Date: Mon, 30 Mar 2015 17:41:34 +0200 Subject: [PATCH] video_dec: Fix issue where EOS Flag is returned multiple times There is a bug that EOS Flag is returned too many times in special cases. Backported-from: hardware/samsung_slsi/exynos5 Change-Id: I2a7e83ce4a3da56585255fb9b3884262056cc24d Signed-off-by: Andreas Schneider --- component/video/dec/h264/Exynos_OMX_H264dec.c | 2 ++ component/video/dec/mpeg4/Exynos_OMX_Mpeg4dec.c | 2 ++ component/video/dec/vp8/Exynos_OMX_Vp8dec.c | 2 ++ 3 files changed, 6 insertions(+) diff --git a/component/video/dec/h264/Exynos_OMX_H264dec.c b/component/video/dec/h264/Exynos_OMX_H264dec.c index 16d2543..6cc8492 100644 --- a/component/video/dec/h264/Exynos_OMX_H264dec.c +++ b/component/video/dec/h264/Exynos_OMX_H264dec.c @@ -2207,6 +2207,7 @@ OMX_ERRORTYPE Exynos_H264Dec_DstOut(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX } else { pDstOutputData->timeStamp = pExynosComponent->timeStamp[pH264Dec->hMFCH264Handle.outputIndexTimestamp]; pDstOutputData->nFlags = pExynosComponent->nFlags[pH264Dec->hMFCH264Handle.outputIndexTimestamp]; + pExynosComponent->nFlags[pH264Dec->hMFCH264Handle.outputIndexTimestamp] = 0x00; Exynos_OSAL_Log(EXYNOS_LOG_TRACE, "missing out indexTimestamp: %d", indexTimestamp); } } else { @@ -2230,6 +2231,7 @@ OMX_ERRORTYPE Exynos_H264Dec_DstOut(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX pDstOutputData->timeStamp = pExynosComponent->timeStamp[indexTimestamp]; pDstOutputData->nFlags = pExynosComponent->nFlags[indexTimestamp]; + pExynosComponent->nFlags[indexTimestamp] = 0x00; Exynos_OSAL_Log(EXYNOS_LOG_TRACE, "timestamp %lld us (%.2f secs), indexTimestamp: %d, nFlags: 0x%x", pDstOutputData->timeStamp, pDstOutputData->timeStamp / 1E6, indexTimestamp, pDstOutputData->nFlags); } diff --git a/component/video/dec/mpeg4/Exynos_OMX_Mpeg4dec.c b/component/video/dec/mpeg4/Exynos_OMX_Mpeg4dec.c index 06d55a4..ff88294 100644 --- a/component/video/dec/mpeg4/Exynos_OMX_Mpeg4dec.c +++ b/component/video/dec/mpeg4/Exynos_OMX_Mpeg4dec.c @@ -2255,6 +2255,7 @@ OMX_ERRORTYPE Exynos_Mpeg4Dec_DstOut(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OM } else { pDstOutputData->timeStamp = pExynosComponent->timeStamp[pMpeg4Dec->hMFCMpeg4Handle.outputIndexTimestamp]; pDstOutputData->nFlags = pExynosComponent->nFlags[pMpeg4Dec->hMFCMpeg4Handle.outputIndexTimestamp]; + pExynosComponent->nFlags[pMpeg4Dec->hMFCMpeg4Handle.outputIndexTimestamp] = 0x00; Exynos_OSAL_Log(EXYNOS_LOG_TRACE, "missing out indexTimestamp: %d", indexTimestamp); } } else { @@ -2278,6 +2279,7 @@ OMX_ERRORTYPE Exynos_Mpeg4Dec_DstOut(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OM pDstOutputData->timeStamp = pExynosComponent->timeStamp[indexTimestamp]; pDstOutputData->nFlags = pExynosComponent->nFlags[indexTimestamp]; + pExynosComponent->nFlags[indexTimestamp] = 0x00; Exynos_OSAL_Log(EXYNOS_LOG_TRACE, "timestamp %lld us (%.2f secs), indexTimestamp: %d, nFlags: 0x%x", pDstOutputData->timeStamp, pDstOutputData->timeStamp / 1E6, indexTimestamp, pDstOutputData->nFlags); } diff --git a/component/video/dec/vp8/Exynos_OMX_Vp8dec.c b/component/video/dec/vp8/Exynos_OMX_Vp8dec.c index 4f225d7..62f34af 100644 --- a/component/video/dec/vp8/Exynos_OMX_Vp8dec.c +++ b/component/video/dec/vp8/Exynos_OMX_Vp8dec.c @@ -1846,6 +1846,7 @@ OMX_ERRORTYPE Exynos_VP8Dec_DstOut(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX_ } else { pDstOutputData->timeStamp = pExynosComponent->timeStamp[pVp8Dec->hMFCVp8Handle.outputIndexTimestamp]; pDstOutputData->nFlags = pExynosComponent->nFlags[pVp8Dec->hMFCVp8Handle.outputIndexTimestamp]; + pExynosComponent->nFlags[pVp8Dec->hMFCVp8Handle.outputIndexTimestamp] = 0x00; Exynos_OSAL_Log(EXYNOS_LOG_TRACE, "missing out indexTimestamp: %d", indexTimestamp); } } else { @@ -1869,6 +1870,7 @@ OMX_ERRORTYPE Exynos_VP8Dec_DstOut(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX_ pDstOutputData->timeStamp = pExynosComponent->timeStamp[indexTimestamp]; pDstOutputData->nFlags = pExynosComponent->nFlags[indexTimestamp]; + pExynosComponent->nFlags[indexTimestamp] = 0x00; Exynos_OSAL_Log(EXYNOS_LOG_TRACE, "timestamp %lld us (%.2f secs), indexTimestamp: %d, nFlags: 0x%x", pDstOutputData->timeStamp, pDstOutputData->timeStamp / 1E6, indexTimestamp, pDstOutputData->nFlags); } -- 2.20.1