From 9c39c5ffa27f2a1cf988f7b0f305c6ddddf1e9b9 Mon Sep 17 00:00:00 2001 From: Taehwan Kim Date: Wed, 13 Feb 2013 08:05:23 +0000 Subject: [PATCH] video/common: resolved prevent defects - 15864 : Null pointer dereferences - 16787, 16788, 16790, 16791, 16793, 16794, 16795 : Memory-illegal access Change-Id: I7d7f0e50f374115c80b60db60d7a6c866e526fed Signed-off-by: Taehwan Kim --- component/common/Exynos_OMX_Basecomponent.c | 5 +--- component/common/Exynos_OMX_Baseport.c | 14 +++++++---- component/video/dec/Exynos_OMX_Vdec.c | 6 +++-- component/video/dec/Exynos_OMX_VdecControl.c | 3 +++ component/video/dec/h264/Exynos_OMX_H264dec.c | 22 ++++++++++-------- .../video/dec/mpeg2/Exynos_OMX_Mpeg2dec.c | 22 ++++++++++-------- .../video/dec/mpeg4/Exynos_OMX_Mpeg4dec.c | 22 ++++++++++-------- component/video/dec/vc1/Exynos_OMX_Wmvdec.c | 23 +++++++++++-------- component/video/dec/vp8/Exynos_OMX_Vp8dec.c | 22 ++++++++++-------- component/video/enc/Exynos_OMX_Venc.c | 6 +++-- component/video/enc/Exynos_OMX_VencControl.c | 6 +++-- component/video/enc/h264/Exynos_OMX_H264enc.c | 22 ++++++++++-------- .../video/enc/mpeg4/Exynos_OMX_Mpeg4enc.c | 22 ++++++++++-------- 13 files changed, 117 insertions(+), 78 deletions(-) diff --git a/component/common/Exynos_OMX_Basecomponent.c b/component/common/Exynos_OMX_Basecomponent.c index 8785a51..4e91847 100644 --- a/component/common/Exynos_OMX_Basecomponent.c +++ b/component/common/Exynos_OMX_Basecomponent.c @@ -335,10 +335,7 @@ OMX_ERRORTYPE Exynos_OMX_ComponentStateSet(OMX_COMPONENTTYPE *pOMXComponent, OMX case OMX_StateLoaded: for (i = 0; i < pExynosComponent->portParam.nPorts; i++) { pExynosPort = (pExynosComponent->pExynosPort + i); - if (pExynosPort == NULL) { - ret = OMX_ErrorBadParameter; - goto EXIT; - } + if (CHECK_PORT_TUNNELED(pExynosPort) && CHECK_PORT_BUFFER_SUPPLIER(pExynosPort)) { if (CHECK_PORT_ENABLED(pExynosPort)) { ret = pExynosComponent->exynos_AllocateTunnelBuffer(pExynosPort, i); diff --git a/component/common/Exynos_OMX_Baseport.c b/component/common/Exynos_OMX_Baseport.c index 0650d70..42b2d98 100644 --- a/component/common/Exynos_OMX_Baseport.c +++ b/component/common/Exynos_OMX_Baseport.c @@ -126,12 +126,16 @@ OMX_ERRORTYPE Exynos_OMX_BufferFlushProcess(OMX_COMPONENTTYPE *pOMXComponent, OM } EXIT: - if ((ret != OMX_ErrorNone) && (pOMXComponent != NULL) && (pExynosComponent != NULL)) { + if (ret != OMX_ErrorNone) { Exynos_OSAL_Log(EXYNOS_LOG_ERROR,"%s : %d", __FUNCTION__, __LINE__); - pExynosComponent->pCallbacks->EventHandler(pOMXComponent, - pExynosComponent->callbackData, - OMX_EventError, - ret, 0, NULL); + + if ((pOMXComponent != NULL) && + (pExynosComponent != NULL)) { + pExynosComponent->pCallbacks->EventHandler(pOMXComponent, + pExynosComponent->callbackData, + OMX_EventError, + ret, 0, NULL); + } } FunctionOut(); diff --git a/component/video/dec/Exynos_OMX_Vdec.c b/component/video/dec/Exynos_OMX_Vdec.c index 5e58096..fefdd0a 100644 --- a/component/video/dec/Exynos_OMX_Vdec.c +++ b/component/video/dec/Exynos_OMX_Vdec.c @@ -100,20 +100,22 @@ void Exynos_Free_CodecBuffers( EXYNOS_OMX_VIDEODEC_COMPONENT *pVideoDec = (EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle; CODEC_DEC_BUFFER **ppCodecBuffer = NULL; - OMX_U32 nPlaneCnt = 0; + OMX_U32 nBufferCnt = 0, nPlaneCnt = 0; int i, j; FunctionIn(); if (nPortIndex == INPUT_PORT_INDEX) { ppCodecBuffer = &(pVideoDec->pMFCDecInputBuffer[0]); + nBufferCnt = MFC_INPUT_BUFFER_NUM_MAX; nPlaneCnt = MFC_INPUT_BUFFER_PLANE; } else { ppCodecBuffer = &(pVideoDec->pMFCDecOutputBuffer[0]); + nBufferCnt = MFC_OUTPUT_BUFFER_NUM_MAX; nPlaneCnt = MFC_OUTPUT_BUFFER_PLANE; } - for (i = 0; i < MFC_OUTPUT_BUFFER_NUM_MAX; i++) { + for (i = 0; i < nBufferCnt; i++) { if (ppCodecBuffer[i] != NULL) { for (j = 0; j < nPlaneCnt; j++) { if (ppCodecBuffer[i]->pVirAddr[j] != NULL) diff --git a/component/video/dec/Exynos_OMX_VdecControl.c b/component/video/dec/Exynos_OMX_VdecControl.c index e99134f..252b29e 100644 --- a/component/video/dec/Exynos_OMX_VdecControl.c +++ b/component/video/dec/Exynos_OMX_VdecControl.c @@ -761,6 +761,9 @@ OMX_ERRORTYPE Exynos_OutputBufferGetQueue(EXYNOS_OMX_BASECOMPONENT *pExynosCompo outputUseBuffer = &(pExynosPort->way.port2WayDataBuffer.outputDataBuffer); } else if (pExynosPort->bufferProcessType & BUFFER_SHARE) { outputUseBuffer = &(pExynosPort->way.port2WayDataBuffer.inputDataBuffer); + } else { + ret = OMX_ErrorUndefined; + goto EXIT; } if (pExynosComponent->currentState != OMX_StateExecuting) { diff --git a/component/video/dec/h264/Exynos_OMX_H264dec.c b/component/video/dec/h264/Exynos_OMX_H264dec.c index f2c5af0..5269d4c 100644 --- a/component/video/dec/h264/Exynos_OMX_H264dec.c +++ b/component/video/dec/h264/Exynos_OMX_H264dec.c @@ -1891,17 +1891,21 @@ OMX_ERRORTYPE Exynos_H264Dec_SrcOut(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX pSrcOutputData->allocSize = pVideoBuffer->planes[0].allocSize; if (pExynosInputPort->bufferProcessType & BUFFER_COPY) { - int i = 0; - while (pSrcOutputData->buffer.singlePlaneBuffer.dataBuffer != pVideoDec->pMFCDecInputBuffer[i]->pVirAddr[0]) { - if (i >= MFC_INPUT_BUFFER_NUM_MAX) { - Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "Can not find buffer"); - ret = (OMX_ERRORTYPE)OMX_ErrorCodecDecode; - goto EXIT; + int i; + for (i = 0; i < MFC_INPUT_BUFFER_NUM_MAX; i++) { + if (pSrcOutputData->buffer.singlePlaneBuffer.dataBuffer == + pVideoDec->pMFCDecInputBuffer[i]->pVirAddr[0]) { + pVideoDec->pMFCDecInputBuffer[i]->dataSize = 0; + pSrcOutputData->pPrivate = pVideoDec->pMFCDecInputBuffer[i]; + break; } - i++; } - pVideoDec->pMFCDecInputBuffer[i]->dataSize = 0; - pSrcOutputData->pPrivate = pVideoDec->pMFCDecInputBuffer[i]; + + if (i >= MFC_INPUT_BUFFER_NUM_MAX) { + Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "Can not find buffer"); + ret = (OMX_ERRORTYPE)OMX_ErrorCodecDecode; + goto EXIT; + } } /* For Share Buffer */ diff --git a/component/video/dec/mpeg2/Exynos_OMX_Mpeg2dec.c b/component/video/dec/mpeg2/Exynos_OMX_Mpeg2dec.c index 947c684..3bd76e9 100644 --- a/component/video/dec/mpeg2/Exynos_OMX_Mpeg2dec.c +++ b/component/video/dec/mpeg2/Exynos_OMX_Mpeg2dec.c @@ -1513,17 +1513,21 @@ OMX_ERRORTYPE Exynos_Mpeg2Dec_SrcOut(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OM pSrcOutputData->allocSize = pVideoBuffer->planes[0].allocSize; if (pExynosInputPort->bufferProcessType & BUFFER_COPY) { - int i = 0; - while (pSrcOutputData->buffer.singlePlaneBuffer.dataBuffer != pVideoDec->pMFCDecInputBuffer[i]->pVirAddr[0]) { - if (i >= MFC_INPUT_BUFFER_NUM_MAX) { - Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "Can not find buffer"); - ret = (OMX_ERRORTYPE)OMX_ErrorCodecDecode; - goto EXIT; + int i; + for (i = 0; i < MFC_INPUT_BUFFER_NUM_MAX; i++) { + if (pSrcOutputData->buffer.singlePlaneBuffer.dataBuffer == + pVideoDec->pMFCDecInputBuffer[i]->pVirAddr[0]) { + pVideoDec->pMFCDecInputBuffer[i]->dataSize = 0; + pSrcOutputData->pPrivate = pVideoDec->pMFCDecInputBuffer[i]; + break; } - i++; } - pVideoDec->pMFCDecInputBuffer[i]->dataSize = 0; - pSrcOutputData->pPrivate = pVideoDec->pMFCDecInputBuffer[i]; + + if (i >= MFC_INPUT_BUFFER_NUM_MAX) { + Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "Can not find buffer"); + ret = (OMX_ERRORTYPE)OMX_ErrorCodecDecode; + goto EXIT; + } } /* For Share Buffer */ diff --git a/component/video/dec/mpeg4/Exynos_OMX_Mpeg4dec.c b/component/video/dec/mpeg4/Exynos_OMX_Mpeg4dec.c index 400f307..680d49f 100644 --- a/component/video/dec/mpeg4/Exynos_OMX_Mpeg4dec.c +++ b/component/video/dec/mpeg4/Exynos_OMX_Mpeg4dec.c @@ -1866,17 +1866,21 @@ OMX_ERRORTYPE Exynos_Mpeg4Dec_SrcOut(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OM pSrcOutputData->allocSize = pVideoBuffer->planes[0].allocSize; if (pExynosInputPort->bufferProcessType & BUFFER_COPY) { - int i = 0; - while (pSrcOutputData->buffer.singlePlaneBuffer.dataBuffer != pVideoDec->pMFCDecInputBuffer[i]->pVirAddr[0]) { - if (i >= MFC_INPUT_BUFFER_NUM_MAX) { - Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "Can not find buffer"); - ret = (OMX_ERRORTYPE)OMX_ErrorCodecDecode; - goto EXIT; + int i; + for (i = 0; i < MFC_INPUT_BUFFER_NUM_MAX; i++) { + if (pSrcOutputData->buffer.singlePlaneBuffer.dataBuffer == + pVideoDec->pMFCDecInputBuffer[i]->pVirAddr[0]) { + pVideoDec->pMFCDecInputBuffer[i]->dataSize = 0; + pSrcOutputData->pPrivate = pVideoDec->pMFCDecInputBuffer[i]; + break; } - i++; } - pVideoDec->pMFCDecInputBuffer[i]->dataSize = 0; - pSrcOutputData->pPrivate = pVideoDec->pMFCDecInputBuffer[i]; + + if (i >= MFC_INPUT_BUFFER_NUM_MAX) { + Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "Can not find buffer"); + ret = (OMX_ERRORTYPE)OMX_ErrorCodecDecode; + goto EXIT; + } } /* For Share Buffer */ diff --git a/component/video/dec/vc1/Exynos_OMX_Wmvdec.c b/component/video/dec/vc1/Exynos_OMX_Wmvdec.c index b588ffa..a0b31d9 100644 --- a/component/video/dec/vc1/Exynos_OMX_Wmvdec.c +++ b/component/video/dec/vc1/Exynos_OMX_Wmvdec.c @@ -1152,6 +1152,7 @@ OMX_ERRORTYPE Exynos_WmvDec_GetParameter( if (pDstWmvParam->nPortIndex > OUTPUT_PORT_INDEX) { ret = OMX_ErrorBadPortIndex; + goto EXIT; } pWmvDec = (EXYNOS_WMVDEC_HANDLE *)((EXYNOS_OMX_VIDEODEC_COMPONENT *)pExynosComponent->hComponentHandle)->hCodecHandle; @@ -1746,17 +1747,21 @@ OMX_ERRORTYPE Exynos_WmvDec_SrcOut(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX_ pSrcOutputData->allocSize = pVideoBuffer->planes[0].allocSize; if (pExynosInputPort->bufferProcessType & BUFFER_COPY) { - int i = 0; - while (pSrcOutputData->buffer.singlePlaneBuffer.dataBuffer != pVideoDec->pMFCDecInputBuffer[i]->pVirAddr[0]) { - if (i >= MFC_INPUT_BUFFER_NUM_MAX) { - Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "Can not find buffer"); - ret = (OMX_ERRORTYPE)OMX_ErrorCodecDecode; - goto EXIT; + int i; + for (i = 0; i < MFC_INPUT_BUFFER_NUM_MAX; i++) { + if (pSrcOutputData->buffer.singlePlaneBuffer.dataBuffer == + pVideoDec->pMFCDecInputBuffer[i]->pVirAddr[0]) { + pVideoDec->pMFCDecInputBuffer[i]->dataSize = 0; + pSrcOutputData->pPrivate = pVideoDec->pMFCDecInputBuffer[i]; + break; } - i++; } - pVideoDec->pMFCDecInputBuffer[i]->dataSize = 0; - pSrcOutputData->pPrivate = pVideoDec->pMFCDecInputBuffer[i]; + + if (i >= MFC_INPUT_BUFFER_NUM_MAX) { + Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "Can not find buffer"); + ret = (OMX_ERRORTYPE)OMX_ErrorCodecDecode; + goto EXIT; + } } /* For Share Buffer */ diff --git a/component/video/dec/vp8/Exynos_OMX_Vp8dec.c b/component/video/dec/vp8/Exynos_OMX_Vp8dec.c index e1c9b6f..c1af2c7 100644 --- a/component/video/dec/vp8/Exynos_OMX_Vp8dec.c +++ b/component/video/dec/vp8/Exynos_OMX_Vp8dec.c @@ -1457,17 +1457,21 @@ OMX_ERRORTYPE Exynos_VP8Dec_SrcOut(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX_ pSrcOutputData->allocSize = pVideoBuffer->planes[0].allocSize; if (pExynosInputPort->bufferProcessType & BUFFER_COPY) { - int i = 0; - while (pSrcOutputData->buffer.singlePlaneBuffer.dataBuffer != pVideoDec->pMFCDecInputBuffer[i]->pVirAddr[0]) { - if (i >= MFC_INPUT_BUFFER_NUM_MAX) { - Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "Can not find buffer"); - ret = (OMX_ERRORTYPE)OMX_ErrorCodecDecode; - goto EXIT; + int i; + for (i = 0; i < MFC_INPUT_BUFFER_NUM_MAX; i++) { + if (pSrcOutputData->buffer.singlePlaneBuffer.dataBuffer == + pVideoDec->pMFCDecInputBuffer[i]->pVirAddr[0]) { + pVideoDec->pMFCDecInputBuffer[i]->dataSize = 0; + pSrcOutputData->pPrivate = pVideoDec->pMFCDecInputBuffer[i]; + break; } - i++; } - pVideoDec->pMFCDecInputBuffer[i]->dataSize = 0; - pSrcOutputData->pPrivate = pVideoDec->pMFCDecInputBuffer[i]; + + if (i >= MFC_INPUT_BUFFER_NUM_MAX) { + Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "Can not find buffer"); + ret = (OMX_ERRORTYPE)OMX_ErrorCodecDecode; + goto EXIT; + } } /* For Share Buffer */ diff --git a/component/video/enc/Exynos_OMX_Venc.c b/component/video/enc/Exynos_OMX_Venc.c index 8dc6158..d3c1d60 100644 --- a/component/video/enc/Exynos_OMX_Venc.c +++ b/component/video/enc/Exynos_OMX_Venc.c @@ -89,20 +89,22 @@ void Exynos_Free_CodecBuffers( EXYNOS_OMX_VIDEOENC_COMPONENT *pVideoEnc = (EXYNOS_OMX_VIDEOENC_COMPONENT *)pExynosComponent->hComponentHandle; CODEC_ENC_BUFFER **ppCodecBuffer = NULL; - OMX_U32 nPlaneCnt = 0; + OMX_U32 nBufferCnt = 0, nPlaneCnt = 0; int i, j; FunctionIn(); if (nPortIndex == INPUT_PORT_INDEX) { ppCodecBuffer = &(pVideoEnc->pMFCEncInputBuffer[0]); + nBufferCnt = MFC_INPUT_BUFFER_NUM_MAX; nPlaneCnt = MFC_INPUT_BUFFER_PLANE; } else { ppCodecBuffer = &(pVideoEnc->pMFCEncOutputBuffer[0]); + nBufferCnt = MFC_OUTPUT_BUFFER_NUM_MAX; nPlaneCnt = MFC_OUTPUT_BUFFER_PLANE; } - for (i = 0; i < MFC_OUTPUT_BUFFER_NUM_MAX; i++) { + for (i = 0; i < nBufferCnt; i++) { if (ppCodecBuffer[i] != NULL) { for (j = 0; j < nPlaneCnt; j++) { if (ppCodecBuffer[i]->pVirAddr[j] != NULL) diff --git a/component/video/enc/Exynos_OMX_VencControl.c b/component/video/enc/Exynos_OMX_VencControl.c index 6d7bdb5..fbd3b6d 100644 --- a/component/video/enc/Exynos_OMX_VencControl.c +++ b/component/video/enc/Exynos_OMX_VencControl.c @@ -1006,6 +1006,9 @@ OMX_ERRORTYPE Exynos_OutputBufferGetQueue( pDataBuffer = &(pExynosPort->way.port2WayDataBuffer.outputDataBuffer); } else if (pExynosPort->bufferProcessType & BUFFER_SHARE) { pDataBuffer = &(pExynosPort->way.port2WayDataBuffer.inputDataBuffer); + } else { + ret = OMX_ErrorUndefined; + goto EXIT; } if (pExynosComponent->currentState != OMX_StateExecuting) { @@ -1014,8 +1017,7 @@ OMX_ERRORTYPE Exynos_OutputBufferGetQueue( } else if ((pExynosComponent->transientState != EXYNOS_OMX_TransStateExecutingToIdle) && (!CHECK_PORT_BEING_FLUSHED(pExynosPort))) { Exynos_OSAL_SemaphoreWait(pExynosPort->bufferSemID); - if ((pDataBuffer != NULL) && - (pDataBuffer->dataValid != OMX_TRUE)) { + if (pDataBuffer->dataValid != OMX_TRUE) { pMessage = (EXYNOS_OMX_MESSAGE *)Exynos_OSAL_Dequeue(&pExynosPort->bufferQ); if (pMessage == NULL) { ret = OMX_ErrorUndefined; diff --git a/component/video/enc/h264/Exynos_OMX_H264enc.c b/component/video/enc/h264/Exynos_OMX_H264enc.c index 32b06b6..856d289 100644 --- a/component/video/enc/h264/Exynos_OMX_H264enc.c +++ b/component/video/enc/h264/Exynos_OMX_H264enc.c @@ -1860,17 +1860,21 @@ OMX_ERRORTYPE Exynos_H264Enc_SrcOut(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OMX pVideoBuffer->planes[2].allocSize; if (pExynosInputPort->bufferProcessType & BUFFER_COPY) { - int i = 0; - while (pSrcOutputData->buffer.multiPlaneBuffer.dataBuffer[0] != pVideoEnc->pMFCEncInputBuffer[i]->pVirAddr[0]) { - if (i >= MFC_INPUT_BUFFER_NUM_MAX) { - Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "%s: %d: Failed - Lost buffer", __FUNCTION__, __LINE__); - ret = (OMX_ERRORTYPE)OMX_ErrorCodecEncode; - goto EXIT; + int i; + for (i = 0; i < MFC_INPUT_BUFFER_NUM_MAX; i++) { + if (pSrcOutputData->buffer.multiPlaneBuffer.dataBuffer[0] == + pVideoEnc->pMFCEncInputBuffer[i]->pVirAddr[0]) { + pVideoEnc->pMFCEncInputBuffer[i]->dataSize = 0; + pSrcOutputData->pPrivate = pVideoEnc->pMFCEncInputBuffer[i]; + break; } - i++; } - pVideoEnc->pMFCEncInputBuffer[i]->dataSize = 0; - pSrcOutputData->pPrivate = pVideoEnc->pMFCEncInputBuffer[i]; + + if (i >= MFC_INPUT_BUFFER_NUM_MAX) { + Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "%s: %d: Failed - Lost buffer", __FUNCTION__, __LINE__); + ret = (OMX_ERRORTYPE)OMX_ErrorCodecEncode; + goto EXIT; + } } /* For Share Buffer */ diff --git a/component/video/enc/mpeg4/Exynos_OMX_Mpeg4enc.c b/component/video/enc/mpeg4/Exynos_OMX_Mpeg4enc.c index ccbb485..cf0e10a 100644 --- a/component/video/enc/mpeg4/Exynos_OMX_Mpeg4enc.c +++ b/component/video/enc/mpeg4/Exynos_OMX_Mpeg4enc.c @@ -2049,17 +2049,21 @@ OMX_ERRORTYPE Exynos_Mpeg4Enc_SrcOut(OMX_COMPONENTTYPE *pOMXComponent, EXYNOS_OM pVideoBuffer->planes[2].allocSize; if (pExynosInputPort->bufferProcessType & BUFFER_COPY) { - int i = 0; - while (pSrcOutputData->buffer.multiPlaneBuffer.dataBuffer[0] != pVideoEnc->pMFCEncInputBuffer[i]->pVirAddr[0]) { - if (i >= MFC_INPUT_BUFFER_NUM_MAX) { - Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "%s: %d: Failed - Lost buffer", __FUNCTION__, __LINE__); - ret = (OMX_ERRORTYPE)OMX_ErrorCodecEncode; - goto EXIT; + int i; + for (i = 0; i < MFC_INPUT_BUFFER_NUM_MAX; i++) { + if (pSrcOutputData->buffer.multiPlaneBuffer.dataBuffer[0] == + pVideoEnc->pMFCEncInputBuffer[i]->pVirAddr[0]) { + pVideoEnc->pMFCEncInputBuffer[i]->dataSize = 0; + pSrcOutputData->pPrivate = pVideoEnc->pMFCEncInputBuffer[i]; + break; } - i++; } - pVideoEnc->pMFCEncInputBuffer[i]->dataSize = 0; - pSrcOutputData->pPrivate = pVideoEnc->pMFCEncInputBuffer[i]; + + if (i >= MFC_INPUT_BUFFER_NUM_MAX) { + Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "%s: %d: Failed - Lost buffer", __FUNCTION__, __LINE__); + ret = (OMX_ERRORTYPE)OMX_ErrorCodecEncode; + goto EXIT; + } } /* For Share Buffer */ -- 2.20.1