ref: 821483a4e9173c442c368f1ebef8eef6c376faf6
parent: 2f53a08aba00895b3378cff1a3af44a7af53de22
author: ruil2 <[email protected]>
date: Wed Jul 9 12:43:58 EDT 2014
fix bug when temporal layer changes
--- a/codec/encoder/core/src/encoder_ext.cpp
+++ b/codec/encoder/core/src/encoder_ext.cpp
@@ -3718,7 +3718,10 @@
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;