shithub: openh264

Download patch

ref: 9f0f8b0a684b1f9ed6c42b31abd6b63faa548869
parent: d76d62d3856e790515edd2d2399d8ce950ab835e
author: huade <huashi@cisco.com>
date: Wed Nov 2 06:25:05 EDT 2016

add log info if bIDR set to false when calling ForceIntraFrame()

--- a/codec/encoder/plus/src/welsEncoderExt.cpp
+++ b/codec/encoder/plus/src/welsEncoderExt.cpp
@@ -473,15 +473,15 @@
  *  Force key frame
  */
 int CWelsH264SVCEncoder::ForceIntraFrame (bool bIDR, int iLayerId) {
-  if (! (m_pEncContext && m_bInitialFlag)) {
-    return 1;
-  }
-
-  //WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO,
-  //         "CWelsH264SVCEncoder::ForceIntraFrame(), bIDR= %d", bIDR);
-
   if ( bIDR ) {
+    if (! (m_pEncContext && m_bInitialFlag)) {
+      return 1;
+    }
+
     ForceCodingIDR(m_pEncContext, iLayerId);
+  } else {
+    WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO,
+            "CWelsH264SVCEncoder::ForceIntraFrame(),nothing to do as bIDR set to false");
   }
 
   return 0;