From 821483a4e9173c442c368f1ebef8eef6c376faf6 Mon Sep 17 00:00:00 2001 From: ruil2 Date: Wed, 9 Jul 2014 16:43:58 +0800 Subject: [PATCH] fix bug when temporal layer changes --- codec/encoder/core/src/encoder_ext.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/codec/encoder/core/src/encoder_ext.cpp b/codec/encoder/core/src/encoder_ext.cpp index fcd83d84..15ea908b 100644 --- a/codec/encoder/core/src/encoder_ext.cpp +++ b/codec/encoder/core/src/encoder_ext.cpp @@ -3718,7 +3718,10 @@ int32_t WelsEncoderParamAdjust (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pNewPa pOldParam->bPrefixNalAddingCtrl = pNewParam->bPrefixNalAddingCtrl; pOldParam->iNumRefFrame = pNewParam->iNumRefFrame; // number of reference frame used pOldParam->uiGopSize = pNewParam->uiGopSize; - pOldParam->iTemporalLayerNum = pNewParam->iTemporalLayerNum; + if (pOldParam->iTemporalLayerNum != pNewParam->iTemporalLayerNum) { + pOldParam->iTemporalLayerNum = pNewParam->iTemporalLayerNum; + (*ppCtx)->iCodingIndex = 0; + } pOldParam->iDecompStages = pNewParam->iDecompStages; /* denoise control */ pOldParam->bEnableDenoise = pNewParam->bEnableDenoise;