ref: a136ba743425080f896ae125263c6b7c3759be6c
parent: 6689f8b8779738518ba71c484c086015e161d6c0
parent: 8b462d6caadca60d03d66dcc4df8596c36223e02
author: huili2 <[email protected]>
date: Mon Mar 13 04:32:50 EDT 2017
Merge pull request #2675 from ruil2/loadbalance need to reset when eSpsPpsIdStrategy is changed
--- a/codec/encoder/core/src/encoder_ext.cpp
+++ b/codec/encoder/core/src/encoder_ext.cpp
@@ -4393,7 +4393,7 @@
//if WelsInitEncoderExt succeed
//for LTR or SPS,PPS ID update
for (iIndexD = 0; iIndexD < pNewParam->iSpatialLayerNum; iIndexD++) {
- pNewParam->sDependencyLayers[iIndexD].uiIdrPicId = uiMaxIdrPicId;
+ (*ppCtx)->pSvcParam->sDependencyLayers[iIndexD].uiIdrPicId = uiMaxIdrPicId;
}
//for sEncoderStatistics
--- a/codec/encoder/plus/src/welsEncoderExt.cpp
+++ b/codec/encoder/plus/src/welsEncoderExt.cpp
@@ -1049,9 +1049,15 @@
m_pEncContext->pSvcParam->eSpsPpsIdStrategy, iValue);
return cmInitParaError;
}
- m_pEncContext->pSvcParam->eSpsPpsIdStrategy = eNewStrategy;
+ SWelsSvcCodingParam sConfig;
+ memcpy (&sConfig, m_pEncContext->pSvcParam, sizeof (SWelsSvcCodingParam));
+ sConfig.eSpsPpsIdStrategy = eNewStrategy;
WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, " CWelsH264SVCEncoder::SetOption eSpsPpsIdStrategy = %d ",
- m_pEncContext->pSvcParam->eSpsPpsIdStrategy);
+ sConfig.eSpsPpsIdStrategy);
+
+ if (WelsEncoderParamAdjust (&m_pEncContext, &sConfig)) {
+ return cmInitParaError;
+ }
}
break;
case ENCODER_OPTION_CURRENT_PATH: {