shithub: openh264

Download patch

ref: 913f174367c2377bb1518f918cc088043b117d0e
parent: 8b462d6caadca60d03d66dcc4df8596c36223e02
author: Karina <[email protected]>
date: Fri Apr 14 12:24:54 EDT 2017

reset encoder when profile/level change

--- a/codec/encoder/core/src/encoder_ext.cpp
+++ b/codec/encoder/core/src/encoder_ext.cpp
@@ -4351,6 +4351,14 @@
         bNeedReset = true;
         break;
       }
+      if (pOldParam->sSpatialLayers[iIndexD].uiProfileIdc !=
+          pNewParam->sSpatialLayers[iIndexD].uiProfileIdc
+          ||
+          pOldParam->sSpatialLayers[iIndexD].uiLevelIdc !=
+          pNewParam->sSpatialLayers[iIndexD].uiLevelIdc) {
+        bNeedReset = true;
+        break;
+      }
 
       // check frame rate
       // we can not check whether corresponding fFrameRate is equal or not,