diff --git a/exynos/multimedia/openmax/component/video/dec/h264/SEC_OMX_H264dec.c b/exynos/multimedia/openmax/component/video/dec/h264/SEC_OMX_H264dec.c index d097f3c..95ccee8 100644 --- a/exynos/multimedia/openmax/component/video/dec/h264/SEC_OMX_H264dec.c +++ b/exynos/multimedia/openmax/component/video/dec/h264/SEC_OMX_H264dec.c @@ -53,6 +53,7 @@ #undef SEC_LOG_TAG #define SEC_LOG_TAG "SEC_H264_DEC" #define SEC_LOG_OFF + #include "SEC_OSAL_Log.h" #define H264_DEC_NUM_OF_EXTRA_BUFFERS 1 @@ -968,6 +969,16 @@ OMX_ERRORTYPE SEC_MFC_H264_Decode_Nonblock(OMX_COMPONENTTYPE *pOMXComponent, SEC #endif FunctionIn(); + if (pSECInputPort->portDefinition.format.video.nFrameWidth > 1920 || + pSECInputPort->portDefinition.format.video.nFrameHeight > 1088) { + SEC_OSAL_Log(SEC_LOG_ERROR, "Unsupported video size: %d, %d.", + pSECInputPort->portDefinition.format.video.nFrameWidth, + pSECInputPort->portDefinition.format.video.nFrameHeight); + /* Decoding unsupported video size causes mediaserver to crash. */ + /* Just don't decode frame to prevent other issues. */ + ret = OMX_ErrorNone; + goto EXIT; + } if (pH264Dec->hMFCH264Handle.bConfiguredMFC == OMX_FALSE) { SSBSIP_MFC_CODEC_TYPE eCodecType = H264_DEC;