Showing the changes to codec/decoder/plus (1 of 5 files). Show all
Unified · Split
| @@ -189,7 +189,7 @@ long CWelsDecoder::Initialize (const SDecodingParam* pParam) { · 188 unmodified lines | ||
| 189 | 189 | } |
| 190 | 190 | |
| 191 | 191 | if (pParam == NULL) { |
| 192 | − WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, "CWelsDecoder::Initialize(), invalid input argument."); | |
| 192 | + WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_ERROR, "CWelsDecoder::Initialize(), invalid input argument."); | |
| 193 | 193 | return cmInitParaError; |
| 194 | 194 | } |
| 195 | 195 | |
| @@ -211,7 +211,7 @@ void CWelsDecoder::UninitDecoder (void) { · 15 unmodified lines | ||
| 211 | 211 | if (NULL == m_pDecContext) |
| 212 | 212 | return; |
| 213 | 213 | |
| 214 | − WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, "into CWelsDecoder::uninit_decoder().."); | |
| 214 | + WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, "CWelsDecoder::uninit_decoder().."); | |
| 215 | 215 | |
| 216 | 216 | WelsEndDecoder (m_pDecContext); |
| 217 | 217 | |
| @@ -221,7 +221,6 @@ void CWelsDecoder::UninitDecoder (void) { · 3 unmodified lines | ||
| 221 | 221 | m_pDecContext = NULL; |
| 222 | 222 | } |
| 223 | 223 | |
| 224 | − WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, "left CWelsDecoder::uninit_decoder().."); | |
| 225 | 224 | } |
| 226 | 225 | |
| 227 | 226 | // the return value of this function is not suitable, it need report failure info to upper layer. |
| @@ -233,7 +232,6 @@ void CWelsDecoder::InitDecoder (void) { · 5 unmodified lines | ||
| 233 | 232 | |
| 234 | 233 | WelsInitDecoder (m_pDecContext, &m_pWelsTrace->m_sLogCtx); |
| 235 | 234 | |
| 236 | − WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, "CWelsDecoder::init_decoder().. left"); | |
| 237 | 235 | } |
| 238 | 236 | |
| 239 | 237 | /* |
| @@ -411,8 +409,17 @@ DECODING_STATE CWelsDecoder::DecodeFrame2 (const unsigned char* kpSrc, · 171 unmodified lines | ||
| 411 | 409 | } |
| 412 | 410 | } |
| 413 | 411 | |
| 414 | − WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, "decode failed, failure type:%d \n", | |
| 412 | + if (m_pDecContext->bPrintFrameErrorTraceFlag) { | |
| 413 | + WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, "decode failed, failure type:%d \n", | |
| 415 | 414 | m_pDecContext->iErrorCode); |
| 415 | + m_pDecContext->bPrintFrameErrorTraceFlag = false; | |
| 416 | + } else { | |
| 417 | + m_pDecContext->iIgnoredErrorInfoPacketCount ++; | |
| 418 | + if (m_pDecContext->iIgnoredErrorInfoPacketCount == INT_MAX) { | |
| 419 | + WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_WARNING, "continuous error reached INT_MAX! Restart as 0."); | |
| 420 | + m_pDecContext->iIgnoredErrorInfoPacketCount = 0; | |
| 421 | + } | |
| 422 | + } | |
| 416 | 423 | return (DECODING_STATE)m_pDecContext->iErrorCode; |
| 417 | 424 | } else { //decoding correct, but may have ECed status |
| 418 | 425 | if (m_pDecContext->bDecErrorConedFlag) { |