From: Sejun Park Date: Fri, 15 Sep 2017 09:23:59 +0000 (+0900) Subject: fixed svace issue X-Git-Tag: accepted/tizen/unified/20170926.165810~1 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fadaptation%2Fap_samsung%2Flibomxil-e3250-v4l2.git;a=commitdiff_plain;h=917e7d0b5a3c75db81f1b38ce031013f4eee2efb fixed svace issue Change-Id: I3377746de3fc03c59f06175bb077330fc1fc666d --- diff --git a/openmax/component/video/enc/mpeg4/Exynos_OMX_Mpeg4enc.c b/openmax/component/video/enc/mpeg4/Exynos_OMX_Mpeg4enc.c index 99c4757..9b2f920 100755 --- a/openmax/component/video/enc/mpeg4/Exynos_OMX_Mpeg4enc.c +++ b/openmax/component/video/enc/mpeg4/Exynos_OMX_Mpeg4enc.c @@ -1120,8 +1120,15 @@ OMX_ERRORTYPE Mpeg4CodecDstSetup(OMX_COMPONENTTYPE *pOMXComponent) for (i = 0; i < MFC_OUTPUT_BUFFER_NUM_MAX; i++) { ExynosVideoPlane plane; pVideoEnc->pMFCEncOutputBuffer[i] = (CODEC_ENC_BUFFER *)Exynos_OSAL_Malloc(sizeof(CODEC_ENC_BUFFER)); + + if (pVideoEnc->pMFCEncOutputBuffer[i] == NULL) { + Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "Failed to Alloc output buffer"); + ret = OMX_ErrorInsufficientResources; + goto EXIT; + } pVideoEnc->pMFCEncOutputBuffer[i]->pVirAddr[0] = (void *)Exynos_OSAL_SharedMemory_Alloc(pVideoEnc->hSharedMemory, OutBufferSize, NORMAL_MEMORY); + if (pVideoEnc->pMFCEncOutputBuffer[i]->pVirAddr[0] == NULL) { Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "Failed to Alloc output buffer"); ret = OMX_ErrorInsufficientResources;