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