fix bug in set option return value
Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 3 files). Show all
Unified · Split
| @@ -3850,9 +3850,10 @@ int32_t WelsEncoderParamAdjust (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pNewPa · 3849 unmodified lines | ||
| 3850 | 3850 | return 0; |
| 3851 | 3851 | } |
| 3852 | 3852 | |
| 3853 | −void WelsEncoderApplyLTR (SLogContext* pLogCtx, sWelsEncCtx** ppCtx, SLTRConfig* pLTRValue) { | |
| 3853 | +int32_t WelsEncoderApplyLTR (SLogContext* pLogCtx, sWelsEncCtx** ppCtx, SLTRConfig* pLTRValue) { | |
| 3854 | 3854 | SWelsSvcCodingParam sConfig; |
| 3855 | 3855 | int32_t iNumRefFrame = 1; |
| 3856 | + int32_t iRet = 0; | |
| 3856 | 3857 | memcpy (&sConfig, (*ppCtx)->pSvcParam, sizeof (SWelsSvcCodingParam)); |
| 3857 | 3858 | sConfig.bEnableLongTermReference = pLTRValue->bEnableLongTermReference; |
| 3858 | 3859 | sConfig.iLTRRefNum = pLTRValue->iLTRRefNum; |
| @@ -3883,7 +3884,8 @@ void WelsEncoderApplyLTR (SLogContext* pLogCtx, sWelsEncCtx** ppCtx, SLTRConfig* · 24 unmodified lines | ||
| 3883 | 3884 | |
| 3884 | 3885 | WelsLog (pLogCtx, WELS_LOG_INFO, " CWelsH264SVCEncoder::SetOption enable LTR = %d,ltrnum = %d", |
| 3885 | 3886 | sConfig.bEnableLongTermReference, sConfig.iLTRRefNum); |
| 3886 | − WelsEncoderParamAdjust (ppCtx, &sConfig); | |
| 3887 | + iRet = WelsEncoderParamAdjust (ppCtx, &sConfig); | |
| 3888 | + return iRet; | |
| 3887 | 3889 | } |
| 3888 | 3890 | int32_t DynSliceRealloc (sWelsEncCtx* pCtx, |
| 3889 | 3891 | SFrameBSInfo* pFrameBsInfo, |