add return value processing
This commit is contained in:
@@ -2086,9 +2086,14 @@ int32_t WelsInitEncoderExt (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pCodingPar
|
|||||||
return iRet;
|
return iRet;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pCodingParam->iMultipleThreadIdc > 1)
|
if (pCodingParam->iMultipleThreadIdc > 1) {
|
||||||
iRet = CreateSliceThreads (pCtx);
|
iRet = CreateSliceThreads (pCtx);
|
||||||
|
if (iRet != 0) {
|
||||||
|
WelsLog (pLogCtx, WELS_LOG_ERROR, "WelsInitEncoderExt(), CreateSliceThreads failed return %d.", iRet);
|
||||||
|
FreeMemorySvc (&pCtx);
|
||||||
|
return iRet;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (pCodingParam->iEntropyCodingModeFlag)
|
if (pCodingParam->iEntropyCodingModeFlag)
|
||||||
WelsCabacInit (pCtx);
|
WelsCabacInit (pCtx);
|
||||||
WelsRcInitModule (pCtx, pCtx->pSvcParam->iRCMode);
|
WelsRcInitModule (pCtx, pCtx->pSvcParam->iRCMode);
|
||||||
|
|||||||
@@ -963,8 +963,11 @@ int32_t CreateSliceThreads (sWelsEncCtx* pCtx) {
|
|||||||
int32_t iIdx = 0;
|
int32_t iIdx = 0;
|
||||||
|
|
||||||
while (iIdx < kiThreadCount) {
|
while (iIdx < kiThreadCount) {
|
||||||
WelsThreadCreate (&pCtx->pSliceThreading->pThreadHandles[iIdx], CodingSliceThreadProc,
|
if (WelsThreadCreate (&pCtx->pSliceThreading->pThreadHandles[iIdx], CodingSliceThreadProc,
|
||||||
&pCtx->pSliceThreading->pThreadPEncCtx[iIdx], 0);
|
&pCtx->pSliceThreading->pThreadPEncCtx[iIdx], 0)) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
++ iIdx;
|
++ iIdx;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user