History

Add the log reduce logic into parse only mode

Haibo Zhu committed 10 years ago

Commit 3ccecfb1 parent c9433ee1 file · +8 −2Browse files

Unified · Split

codec/decoder/plus/src/welsDecoderExt.cpp+8−2
@@ -330,7 +330,8 @@ long CWelsDecoder::SetOption (DECODER_OPTION eOptID, void* pOption) { · 329 unmodified lines
330 if (m_pWelsTrace) {330 if (m_pWelsTrace) {
331 WelsTraceCallback callback = * ((WelsTraceCallback*)pOption);331 WelsTraceCallback callback = * ((WelsTraceCallback*)pOption);
332 m_pWelsTrace->SetTraceCallback (callback);332 m_pWelsTrace->SetTraceCallback (callback);
333 WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, "CWelsDecoder::SetOption():DECODER_OPTION_TRACE_CALLBACK callback = %p.",333 WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO,
334 "CWelsDecoder::SetOption():DECODER_OPTION_TRACE_CALLBACK callback = %p.",
334 callback);335 callback);
335 }336 }
336 return cmResultSuccess;337 return cmResultSuccess;
@@ -510,7 +511,7 @@ DECODING_STATE CWelsDecoder::DecodeFrame2 (const unsigned char* kpSrc, · 173 unmodified lines
510 eNalType = m_pDecContext->sCurNalHead.eNalUnitType;511 eNalType = m_pDecContext->sCurNalHead.eNalUnitType;
511 512
512 if (m_pDecContext->iErrorCode & dsOutOfMemory) {513 if (m_pDecContext->iErrorCode & dsOutOfMemory) {
513 if(ResetDecoder())514 if (ResetDecoder())
514 return dsOutOfMemory;515 return dsOutOfMemory;
515 }516 }
516 //for AVC bitstream (excluding AVC with temporal scalability, including TP), as long as error occur, SHOULD notify upper layer key frame loss.517 //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, · 131 unmodified lines
648 649
649 m_pDecContext->bInstantDecFlag = false; //reset no-delay flag650 m_pDecContext->bInstantDecFlag = false; //reset no-delay flag
650 651
652 if (m_pDecContext->iErrorCode && m_pDecContext->bPrintFrameErrorTraceFlag) {
653 WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, "decode failed, failure type:%d \n", m_pDecContext->iErrorCode);
654 m_pDecContext->bPrintFrameErrorTraceFlag = false;
655 }
656
651 return (DECODING_STATE) m_pDecContext->iErrorCode;657 return (DECODING_STATE) m_pDecContext->iErrorCode;
652}658}
653 659

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t