shithub: openh264

Download patch

ref: d76d62d3856e790515edd2d2399d8ce950ab835e
parent: 8bf907ea042263b4839d9437f8587db2078c29eb
author: shihuade <[email protected]>
date: Wed Nov 2 05:48:44 EDT 2016

API update--do nothing if bIDR set to false when calling ForceIntraFrame()

--- a/codec/encoder/plus/src/welsEncoderExt.cpp
+++ b/codec/encoder/plus/src/welsEncoderExt.cpp
@@ -476,10 +476,13 @@
   if (! (m_pEncContext && m_bInitialFlag)) {
     return 1;
   }
+
   //WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO,
   //         "CWelsH264SVCEncoder::ForceIntraFrame(), bIDR= %d", bIDR);
 
-  ForceCodingIDR (m_pEncContext, iLayerId);
+  if ( bIDR ) {
+    ForceCodingIDR(m_pEncContext, iLayerId);
+  }
 
   return 0;
 }