Merge pull request #1243 from ruil2/comment

add parameter verification
This commit is contained in:
huili2 2014-08-05 14:58:01 +08:00
commit 0dd0b06287

View File

@ -173,7 +173,8 @@ void CWelsH264SVCEncoder::InitEncoder (void) {
}
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 @@ int CWelsH264SVCEncoder::EncodeFrame (const SSourcePicture* kpSrcPic, SFrameBSIn
if (! (kpSrcPic && m_bInitialFlag && pBsInfo)) {
return cmInitParaError;
}
if (kpSrcPic->iColorFormat != videoFormatI420)
return cmInitParaError;
const int32_t kiEncoderReturn = EncodeFrameInternal (kpSrcPic, pBsInfo);