ref: 52af29ec77b10ca7ecadcdcf8de5b09c472db72d
parent: 8a12d8a0681a17425c1a3bb6bd34259417056d9f
author: volvet <qizh@cisco.com>
date: Tue Apr 8 13:21:56 EDT 2014
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) {