shithub: openh264

Download patch

ref: 0dd0b06287890993f3b799e12b253ab7c0cc6169
parent: 11bf575892e00a248084ad3e8e06d50d484d4b13
parent: 059e19074aed6836893ade9c6f0eb239579f9629
author: huili2 <huili2@cisco.com>
date: Tue Aug 5 10:58:01 EDT 2014

Merge pull request #1243 from ruil2/comment

add parameter verification

--- a/codec/encoder/plus/src/welsEncoderExt.cpp
+++ b/codec/encoder/plus/src/welsEncoderExt.cpp
@@ -173,7 +173,8 @@
   }
 
   m_pWelsTrace->SetTraceLevel (WELS_LOG_ERROR);
-  WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, "CWelsH264SVCEncoder::InitEncoder(), openh264 codec version = %s", VERSION_NUMBER);
+  WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, "CWelsH264SVCEncoder::InitEncoder(), openh264 codec version = %s",
+           VERSION_NUMBER);
 #ifdef REC_FRAME_COUNT
   WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO,
            "CWelsH264SVCEncoder::InitEncoder, m_uiCountFrameNum= %d, m_iCspInternal= 0x%x\n", m_uiCountFrameNum, m_iCspInternal);
@@ -421,6 +422,8 @@
   if (! (kpSrcPic && m_bInitialFlag && pBsInfo)) {
     return cmInitParaError;
   }
+  if (kpSrcPic->iColorFormat != videoFormatI420)
+    return cmInitParaError;
 
   const int32_t kiEncoderReturn = EncodeFrameInternal (kpSrcPic, pBsInfo);