Error frame is skipped by Check_Stream_StartCode function.
but, It isn't returned to client.
added OMX_ErrorCorruptedFrame return type and handling scheme.
Change-Id: I18bff34e143b6b956f77346f27c8926c5aef1022
Signed-off-by: Taehwan Kim <t_h.kim@samsung.com>
Signed-off-by: Huisung Kang <hs1218.kang@samsung.com>
}
ret = pVideoDec->exynos_codec_srcInputProcess(pOMXComponent, pSrcInputData);
+ if (ret == OMX_ErrorCorruptedFrame) {
+ if (exynosInputPort->bufferProcessType & BUFFER_COPY) {
+ OMX_PTR codecBuffer;
+ codecBuffer = pSrcInputData->pPrivate;
+ if (codecBuffer != NULL)
+ Exynos_CodecBufferEnQueue(pExynosComponent, INPUT_PORT_INDEX, codecBuffer);
+ }
+
+ if (exynosInputPort->bufferProcessType & BUFFER_SHARE) {
+ Exynos_OMX_InputBufferReturn(pOMXComponent, pSrcInputData->bufferHeader);
+ }
+ }
+
if (ret != OMX_ErrorInputDataDecodeYet) {
Exynos_ResetCodecData(pSrcInputData);
}
EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
OMX_U32 oneFrameSize = pSrcInputData->dataLen;
+ OMX_BOOL bInStartCode = OMX_FALSE;
ExynosVideoDecOps *pDecOps = pH264Dec->hMFCH264Handle.pDecOps;
ExynosVideoDecBufferOps *pInbufOps = pH264Dec->hMFCH264Handle.pInbufOps;
ExynosVideoDecBufferOps *pOutbufOps = pH264Dec->hMFCH264Handle.pOutbufOps;
}
if (((pVideoDec->bDRMPlayerMode == OMX_TRUE) ||
- (Check_H264_StartCode(pSrcInputData->buffer.singlePlaneBuffer.dataBuffer, oneFrameSize) == OMX_TRUE)) ||
+ ((bInStartCode = Check_H264_StartCode(pSrcInputData->buffer.singlePlaneBuffer.dataBuffer, oneFrameSize)) == OMX_TRUE)) ||
((pSrcInputData->nFlags & OMX_BUFFERFLAG_EOS) == OMX_BUFFERFLAG_EOS)) {
pExynosComponent->timeStamp[pH264Dec->hMFCH264Handle.indexTimestamp] = pSrcInputData->timeStamp;
pExynosComponent->nFlags[pH264Dec->hMFCH264Handle.indexTimestamp] = pSrcInputData->nFlags;
Exynos_OSAL_SignalSet(pH264Dec->hDestinationStartEvent);
Exynos_OSAL_SleepMillisec(0);
}
+ } else if (bInStartCode == OMX_FALSE) {
+ ret = OMX_ErrorCorruptedFrame;
+ goto EXIT;
}
ret = OMX_ErrorNone;
}
ret = Exynos_H264Dec_SrcIn(pOMXComponent, pSrcInputData);
- if ((ret != OMX_ErrorNone) && (ret != OMX_ErrorInputDataDecodeYet)) {
+ if ((ret != OMX_ErrorNone) &&
+ (ret != OMX_ErrorInputDataDecodeYet) &&
+ (ret != OMX_ErrorCorruptedFrame)) {
pExynosComponent->pCallbacks->EventHandler((OMX_HANDLETYPE)pOMXComponent,
pExynosComponent->callbackData,
OMX_EventError, ret, 0, NULL);
EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
OMX_U32 oneFrameSize = pSrcInputData->dataLen;
+ OMX_BOOL bInStartCode = OMX_FALSE;
ExynosVideoDecOps *pDecOps = pMpeg4Dec->hMFCMpeg4Handle.pDecOps;
ExynosVideoDecBufferOps *pInbufOps = pMpeg4Dec->hMFCMpeg4Handle.pInbufOps;
ExynosVideoDecBufferOps *pOutbufOps = pMpeg4Dec->hMFCMpeg4Handle.pOutbufOps;
ret = Mpeg4CodecDstSetup(pOMXComponent);
}
- if ((Check_Stream_StartCode(pSrcInputData->buffer.singlePlaneBuffer.dataBuffer, oneFrameSize, pMpeg4Dec->hMFCMpeg4Handle.codecType) == OMX_TRUE) ||
+ if (((bInStartCode = Check_Stream_StartCode(pSrcInputData->buffer.singlePlaneBuffer.dataBuffer, oneFrameSize, pMpeg4Dec->hMFCMpeg4Handle.codecType)) == OMX_TRUE) ||
((pSrcInputData->nFlags & OMX_BUFFERFLAG_EOS) == OMX_BUFFERFLAG_EOS)) {
pExynosComponent->timeStamp[pMpeg4Dec->hMFCMpeg4Handle.indexTimestamp] = pSrcInputData->timeStamp;
pExynosComponent->nFlags[pMpeg4Dec->hMFCMpeg4Handle.indexTimestamp] = pSrcInputData->nFlags;
Exynos_OSAL_SignalSet(pMpeg4Dec->hDestinationStartEvent);
Exynos_OSAL_SleepMillisec(0);
}
+ } else if (bInStartCode == OMX_FALSE) {
+ ret = OMX_ErrorCorruptedFrame;
+ goto EXIT;
}
ret = OMX_ErrorNone;
}
ret = Exynos_Mpeg4Dec_SrcIn(pOMXComponent, pSrcInputData);
- if ((ret != OMX_ErrorNone) && (ret != OMX_ErrorInputDataDecodeYet)) {
+ if ((ret != OMX_ErrorNone) &&
+ (ret != OMX_ErrorInputDataDecodeYet) &&
+ (ret != OMX_ErrorCorruptedFrame)) {
pExynosComponent->pCallbacks->EventHandler((OMX_HANDLETYPE)pOMXComponent,
pExynosComponent->callbackData,
OMX_EventError, ret, 0, NULL);
EXYNOS_OMX_BASEPORT *pExynosInputPort = &pExynosComponent->pExynosPort[INPUT_PORT_INDEX];
EXYNOS_OMX_BASEPORT *pExynosOutputPort = &pExynosComponent->pExynosPort[OUTPUT_PORT_INDEX];
OMX_U32 oneFrameSize = pSrcInputData->dataLen;
+ OMX_BOOL bInStartCode = OMX_FALSE;
ExynosVideoDecOps *pDecOps = pVp8Dec->hMFCVp8Handle.pDecOps;
ExynosVideoDecBufferOps *pInbufOps = pVp8Dec->hMFCVp8Handle.pInbufOps;
ExynosVideoDecBufferOps *pOutbufOps = pVp8Dec->hMFCVp8Handle.pOutbufOps;
ret = VP8CodecDstSetup(pOMXComponent);
}
- if ((Check_VP8_StartCode(pSrcInputData->buffer.singlePlaneBuffer.dataBuffer, oneFrameSize) == OMX_TRUE) ||
+ if (((bInStartCode = Check_VP8_StartCode(pSrcInputData->buffer.singlePlaneBuffer.dataBuffer, oneFrameSize)) == OMX_TRUE) ||
((pSrcInputData->nFlags & OMX_BUFFERFLAG_EOS) == OMX_BUFFERFLAG_EOS)) {
pExynosComponent->timeStamp[pVp8Dec->hMFCVp8Handle.indexTimestamp] = pSrcInputData->timeStamp;
pExynosComponent->nFlags[pVp8Dec->hMFCVp8Handle.indexTimestamp] = pSrcInputData->nFlags;
Exynos_OSAL_SignalSet(pVp8Dec->hDestinationStartEvent);
Exynos_OSAL_SleepMillisec(0);
}
+ } else if (bInStartCode == OMX_FALSE) {
+ ret = OMX_ErrorCorruptedFrame;
+ goto EXIT;
}
ret = OMX_ErrorNone;
}
ret = Exynos_VP8Dec_SrcIn(pOMXComponent, pSrcInputData);
- if ((ret != OMX_ErrorNone) && (ret != OMX_ErrorInputDataDecodeYet)) {
+ if ((ret != OMX_ErrorNone) &&
+ (ret != OMX_ErrorInputDataDecodeYet) &&
+ (ret != OMX_ErrorCorruptedFrame)) {
pExynosComponent->pCallbacks->EventHandler((OMX_HANDLETYPE)pOMXComponent,
pExynosComponent->callbackData,
OMX_EventError, ret, 0, NULL);
OMX_ErrorCodecDecode = (OMX_S32) 0x90000005,
OMX_ErrorCodecEncode = (OMX_S32) 0x90000006,
OMX_ErrorCodecFlush = (OMX_S32) 0x90000007,
- OMX_ErrorOutputBufferUseYet = (OMX_S32) 0x90000008
+ OMX_ErrorOutputBufferUseYet = (OMX_S32) 0x90000008,
+ OMX_ErrorCorruptedFrame = (OMX_S32) 0x90000009
} EXYNOS_OMX_ERRORTYPE;
typedef enum _EXYNOS_OMX_COMMANDTYPE