Merge pull request #633 from volvet/rm_redundant_protect
remove redundant protect code
This commit is contained in:
commit
9993198a3c
@ -495,9 +495,8 @@ pMa->WelsFree (*pParam, "SWelsSvcCodingParam");
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int32_t AllocCodingParam (SWelsSvcCodingParam** pParam, CMemoryAlign* pMa,
|
||||
const int32_t kiRequestNumSpatial) {
|
||||
if (pParam == NULL || pMa == NULL || kiRequestNumSpatial < 1 || kiRequestNumSpatial > MAX_SPATIAL_LAYER_NUM)
|
||||
static inline int32_t AllocCodingParam (SWelsSvcCodingParam** pParam, CMemoryAlign* pMa) {
|
||||
if (pParam == NULL || pMa == NULL)
|
||||
return 1;
|
||||
if (*pParam != NULL) {
|
||||
FreeCodingParam (pParam, pMa);
|
||||
|
@ -1896,7 +1896,7 @@ int32_t WelsInitEncoderExt (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pCodingPar
|
||||
#endif//ENABLE_TRACE_FILE
|
||||
|
||||
pCodingParam->DetermineTemporalSettings();
|
||||
iRet = AllocCodingParam (&pCtx->pSvcParam, pCtx->pMemAlign, pCodingParam->iSpatialLayerNum);
|
||||
iRet = AllocCodingParam (&pCtx->pSvcParam, pCtx->pMemAlign);
|
||||
if (iRet != 0) {
|
||||
FreeMemorySvc (&pCtx);
|
||||
return iRet;
|
||||
|
Loading…
Reference in New Issue
Block a user