Showing the changes to codec/decoder/plus/src/welsDecoderExt.cpp (1 of 6 files). Show all
Unified · Split
| @@ -264,7 +264,8 @@ int32_t CWelsDecoder::InitDecoder (const SDecodingParam* pParam) { · 263 unmodified lines | ||
| 264 | 264 | WELS_VERIFY_RETURN_IFNEQ (iRet, cmResultSuccess); |
| 265 | 265 | |
| 266 | 266 | //init decoder |
| 267 | − WELS_VERIFY_RETURN_PROC_IF (cmMallocMemeError, WelsInitDecoder (m_pDecContext, &m_pWelsTrace->m_sLogCtx), UninitDecoder()) | |
| 267 | + WELS_VERIFY_RETURN_PROC_IF (cmMallocMemeError, WelsInitDecoder (m_pDecContext, &m_pWelsTrace->m_sLogCtx), | |
| 268 | + UninitDecoder()) | |
| 268 | 269 | |
| 269 | 270 | return cmResultSuccess; |
| 270 | 271 | } |
| @@ -678,6 +679,12 @@ DECODING_STATE CWelsDecoder::DecodeParser (const unsigned char* kpSrc, · 407 unmodified lines | ||
| 678 | 679 | m_pDecContext->uiTimeStamp = 0; |
| 679 | 680 | } |
| 680 | 681 | WelsDecodeBs (m_pDecContext, kpSrc, kiSrcLen, NULL, NULL, pDstInfo); |
| 682 | + if (m_pDecContext->iErrorCode & dsOutOfMemory) { | |
| 683 | + if (ResetDecoder()) | |
| 684 | + return dsOutOfMemory; | |
| 685 | + return dsErrorFree; | |
| 686 | + } | |
| 687 | + | |
| 681 | 688 | if (!m_pDecContext->bFramePending && m_pDecContext->pParserBsInfo->iNalNum) { |
| 682 | 689 | memcpy (pDstInfo, m_pDecContext->pParserBsInfo, sizeof (SParserBsInfo)); |
| 683 | 690 | } |