| 458 | } |
| 459 | |
| 460 | int32_t CWelsDecoder::ThreadResetDecoder (PWelsDecoderContext& pCtx) { |
| 461 | // TBC: need to be modified when context and trace point are null |
| 462 | SDecodingParam sPrevParam; |
| 463 | if (pCtx != NULL && m_pWelsTrace != NULL) { |
| 464 | WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, "ResetDecoder(), context error code is %d", pCtx->iErrorCode); |
| 465 | memcpy (&sPrevParam, pCtx->pParam, sizeof (SDecodingParam)); |
| 466 | ResetReorderingPictureBuffers (&m_sReoderingStatus, m_sPictInfoList, true); |
| 467 | CloseDecoderThreads(); |
| 468 | UninitDecoder(); |
| 469 | InitDecoder (&sPrevParam); |
| 470 | } else if (m_pWelsTrace != NULL) { |
| 471 | WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_ERROR, "ResetDecoder() failed as decoder context null"); |
| 472 | } |
| 473 | return ERR_INFO_UNINIT; |
| 474 | } |
| 475 | |
| 476 | /* |
| 477 | * Set Option |
nothing calls this directly
no test coverage detected