Add the log reduce logic into parse only mode
This commit is contained in:
parent
c9433ee73b
commit
3ccecfbdbe
@ -330,7 +330,8 @@ long CWelsDecoder::SetOption (DECODER_OPTION eOptID, void* pOption) {
|
||||
if (m_pWelsTrace) {
|
||||
WelsTraceCallback callback = * ((WelsTraceCallback*)pOption);
|
||||
m_pWelsTrace->SetTraceCallback (callback);
|
||||
WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, "CWelsDecoder::SetOption():DECODER_OPTION_TRACE_CALLBACK callback = %p.",
|
||||
WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO,
|
||||
"CWelsDecoder::SetOption():DECODER_OPTION_TRACE_CALLBACK callback = %p.",
|
||||
callback);
|
||||
}
|
||||
return cmResultSuccess;
|
||||
@ -510,7 +511,7 @@ DECODING_STATE CWelsDecoder::DecodeFrame2 (const unsigned char* kpSrc,
|
||||
eNalType = m_pDecContext->sCurNalHead.eNalUnitType;
|
||||
|
||||
if (m_pDecContext->iErrorCode & dsOutOfMemory) {
|
||||
if(ResetDecoder())
|
||||
if (ResetDecoder())
|
||||
return dsOutOfMemory;
|
||||
}
|
||||
//for AVC bitstream (excluding AVC with temporal scalability, including TP), as long as error occur, SHOULD notify upper layer key frame loss.
|
||||
@ -648,6 +649,11 @@ DECODING_STATE CWelsDecoder::DecodeParser (const unsigned char* kpSrc,
|
||||
|
||||
m_pDecContext->bInstantDecFlag = false; //reset no-delay flag
|
||||
|
||||
if (m_pDecContext->iErrorCode && m_pDecContext->bPrintFrameErrorTraceFlag) {
|
||||
WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, "decode failed, failure type:%d \n", m_pDecContext->iErrorCode);
|
||||
m_pDecContext->bPrintFrameErrorTraceFlag = false;
|
||||
}
|
||||
|
||||
return (DECODING_STATE) m_pDecContext->iErrorCode;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user