ref: 8b462d6caadca60d03d66dcc4df8596c36223e02
parent: 1052fc6b8f915d2eb9e44f8bff0c268d9f8e47a6
author: Karina <ruil2@cisco.com>
date: Tue Mar 7 11:35:48 EST 2017
need to be reset when eSpsPpsIdStrategy is changed fix uiIdrPicId update issue
--- a/codec/encoder/core/src/encoder_ext.cpp
+++ b/codec/encoder/core/src/encoder_ext.cpp
@@ -4404,7 +4404,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: {