wmvdec: modified NEED_TIMESTAMP_REORDER handling
authorTaehwan Kim <t_h.kim@samsung.com>
Wed, 16 Jan 2013 08:08:29 +0000 (08:08 +0000)
committerTaehwan Kim <t_h.kim@samsung.com>
Thu, 17 Jan 2013 10:10:27 +0000 (10:10 +0000)
if there is a skipping frame before the EOS frame,
used the already saved index about timestamp.
so, couldn't notice the EOS flag.

this patch fixes the above problem.

Change-Id: Ib2d7329f4e3c3f4f46fa5bc92bcbd3371af7a09e
Signed-off-by: Taehwan Kim <t_h.kim@samsung.com>
component/video/dec/vc1/Exynos_OMX_Wmvdec.c

index 4a22d9369a4e0f55b242f247f28d8309e4583e39..4a4b5e9bb53a533b128ff81041c01c91cb7f1376 100644 (file)
@@ -1908,7 +1908,9 @@ OMX_ERRORTYPE Exynos_WmvDec_DstOut(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX_
         /* For timestamp correction. if mfc support frametype detect */
         Exynos_OSAL_Log(EXYNOS_LOG_TRACE, "disp_pic_frame_type: %d", pVideoBuffer->frameType);
 #ifdef NEED_TIMESTAMP_REORDER
-        if ((pVideoBuffer->frameType == VIDEO_FRAME_I)) {
+        if ((pVideoBuffer->frameType == VIDEO_FRAME_I) ||
+            ((pVideoBuffer->frameType == VIDEO_FRAME_OTHERS) &&
+                ((pExynosComponent->nFlags[indexTimestamp] & OMX_BUFFERFLAG_EOS) == OMX_BUFFERFLAG_EOS))) {
             pDstOutputData->timeStamp = pExynosComponent->timeStamp[indexTimestamp];
             pDstOutputData->nFlags = pExynosComponent->nFlags[indexTimestamp];
             pWmvDec->hMFCWmvHandle.outputIndexTimestamp = indexTimestamp;