add return value processing
Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 2 files). Show all
Unified · Split
| @@ -2086,9 +2086,14 @@ int32_t WelsInitEncoderExt (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pCodingPar · 2085 unmodified lines | |||
| 2086 | return iRet; | 2086 | return iRet; |
| 2087 | } | 2087 | } |
| 2088 | 2088 | ||
| 2089 | if (pCodingParam->iMultipleThreadIdc > 1) | 2089 | if (pCodingParam->iMultipleThreadIdc > 1) { |
| 2090 | iRet = CreateSliceThreads (pCtx); | 2090 | iRet = CreateSliceThreads (pCtx); |
| 2091 | 2091 | if (iRet != 0) { | |
| 2092 | WelsLog (pLogCtx, WELS_LOG_ERROR, "WelsInitEncoderExt(), CreateSliceThreads failed return %d.", iRet); | ||
| 2093 | FreeMemorySvc (&pCtx); | ||
| 2094 | return iRet; | ||
| 2095 | } | ||
| 2096 | } | ||
| 2092 | if (pCodingParam->iEntropyCodingModeFlag) | 2097 | if (pCodingParam->iEntropyCodingModeFlag) |
| 2093 | WelsCabacInit (pCtx); | 2098 | WelsCabacInit (pCtx); |
| 2094 | WelsRcInitModule (pCtx, pCtx->pSvcParam->iRCMode); | 2099 | WelsRcInitModule (pCtx, pCtx->pSvcParam->iRCMode); |