| 437 | } |
| 438 | |
| 439 | int32_t CWelsDecoder::ResetDecoder (PWelsDecoderContext& pCtx) { |
| 440 | // TBC: need to be modified when context and trace point are null |
| 441 | if (m_iThreadCount >= 1) { |
| 442 | ThreadResetDecoder (pCtx); |
| 443 | } else { |
| 444 | if (pCtx != NULL && m_pWelsTrace != NULL) { |
| 445 | WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, "ResetDecoder(), context error code is %d", |
| 446 | pCtx->iErrorCode); |
| 447 | SDecodingParam sPrevParam; |
| 448 | memcpy (&sPrevParam, pCtx->pParam, sizeof (SDecodingParam)); |
| 449 | |
| 450 | WELS_VERIFY_RETURN_PROC_IF (cmInitParaError, InitDecoderCtx (pCtx, &sPrevParam), |
| 451 | UninitDecoderCtx (pCtx)); |
| 452 | } else if (m_pWelsTrace != NULL) { |
| 453 | WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_ERROR, "ResetDecoder() failed as decoder context null"); |
| 454 | } |
| 455 | ResetReorderingPictureBuffers (&m_sReoderingStatus, m_sPictInfoList, false); |
| 456 | } |
| 457 | return ERR_INFO_UNINIT; |
| 458 | } |
| 459 | |
| 460 | int32_t CWelsDecoder::ThreadResetDecoder (PWelsDecoderContext& pCtx) { |
| 461 | // TBC: need to be modified when context and trace point are null |
nothing calls this directly
no test coverage detected