vc1dec: WMV decoder EOS handling fix
authorTaehwan Kim <t_h.kim@samsung.com>
Fri, 14 Dec 2012 04:03:20 +0000 (04:03 +0000)
committerTaehwan Kim <t_h.kim@samsung.com>
Fri, 21 Dec 2012 04:45:00 +0000 (04:45 +0000)
This patch solves eos event not returned issue

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

index aacfbbec5a4ba04dd8c0b902c2870b3e0cca468e..d46917533d88e631ae3dd2d0d6ee6f6d1a633fa0 100644 (file)
@@ -1648,7 +1648,8 @@ OMX_ERRORTYPE Exynos_WmvDec_SrcIn(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX_D
     }
 
     bStartCode = Check_Stream_PrefixCode(pSrcInputData->buffer.singlePlaneBuffer.dataBuffer, oneFrameSize, pWmvDec->hMFCWmvHandle.wmvFormat);
-    if (bStartCode == OMX_FALSE) {
+    if ((bStartCode == OMX_FALSE) &&
+        ((pSrcInputData->nFlags & OMX_BUFFERFLAG_EOS) != OMX_BUFFERFLAG_EOS)) {
         if (pSrcInputData->allocSize < oneFrameSize+4) {
             Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "Can't attach startcode due to lack of buffer space");
             ret = (OMX_ERRORTYPE)OMX_ErrorCodecDecode;