ref: 98c6c6de119de1b082df4cb0373d9eaac886a6f6
parent: 3b68840d5f437f46c16d3f4abeeaa9970adb77dd
parent: 3ccecfbdbea6ba0aaa01db697d809e72b6203937
author: HaiboZhu <haibozhu@cisco.com>
date: Wed Apr 20 06:48:57 EDT 2016
Merge pull request #2446 from HaiboZhu/Reduce_log_size_for_parse_only_mode Add the log reduce logic into parse only mode
--- a/codec/decoder/plus/src/welsDecoderExt.cpp
+++ b/codec/decoder/plus/src/welsDecoderExt.cpp
@@ -330,7 +330,8 @@
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 @@
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.
@@ -647,6 +648,11 @@
}
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;
}