shithub: openh264

Download patch

ref: 4b5a455e1688062de7cdff5f3cd64db73223a757
parent: 4ba216b000d823c95947752c70ead1840db4e92c
parent: 52af29ec77b10ca7ecadcdcf8de5b09c472db72d
author: Licai Guo <licaguo@cisco.com>
date: Wed Apr 9 05:16:14 EDT 2014

Merge pull request #654 from volvet/refine_enc_frame

refine method EncodeFrame

--- a/codec/encoder/plus/src/welsEncoderExt.cpp
+++ b/codec/encoder/plus/src/welsEncoderExt.cpp
@@ -474,7 +474,7 @@
  *	SVC core encoding
  */
 int CWelsH264SVCEncoder::EncodeFrame (const SSourcePicture* kpSrcPic, SFrameBSInfo* pBsInfo) {
-  if (! (kpSrcPic && m_pEncContext && m_bInitialFlag)) {
+  if (! (kpSrcPic && m_bInitialFlag && pBsInfo)) {
     return cmInitParaError;
   }
 
@@ -497,10 +497,6 @@
 
 
 int CWelsH264SVCEncoder::EncodeFrameInternal(const SSourcePicture*  pSrcPic, SFrameBSInfo* pBsInfo) {
-  if (!(pSrcPic && m_pEncContext && m_bInitialFlag) ){
-    return cmInitParaError;
-  }
-
   const int32_t kiEncoderReturn = WelsEncoderEncodeExt (m_pEncContext, pBsInfo, pSrcPic);
 
   if(kiEncoderReturn == ENC_RETURN_MEMALLOCERR) {