History

add return value processing

ruil2 committed 12 years ago

Commit 66165a61 parent 128546b2 files · +12 −4Browse files

Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 2 files). Show all

Unified · Split

codec/encoder/core/src/encoder_ext.cpp+7−2
@@ -2086,9 +2086,14 @@ int32_t WelsInitEncoderExt (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pCodingPar · 2085 unmodified lines
20862086 return iRet;
20872087 }
20882088
2089− if (pCodingParam->iMultipleThreadIdc > 1)
2089+ if (pCodingParam->iMultipleThreadIdc > 1) {
20902090 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+ }
20922097 if (pCodingParam->iEntropyCodingModeFlag)
20932098 WelsCabacInit (pCtx);
20942099 WelsRcInitModule (pCtx, pCtx->pSvcParam->iRCMode);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t