Merge pull request #1526 from ruil2/max_nal_size

add return value processing
This commit is contained in:
sijchen 2014-11-17 16:43:45 -08:00
commit 0252f3f346
2 changed files with 12 additions and 4 deletions

View File

@ -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);

View File

@ -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;
}