| 345 | } |
| 346 | |
| 347 | void CWelsDecoder::UninitDecoderCtx (PWelsDecoderContext& pCtx) { |
| 348 | if (pCtx != NULL) { |
| 349 | |
| 350 | WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, "CWelsDecoder::UninitDecoderCtx(), openh264 codec version = %s.", |
| 351 | VERSION_NUMBER); |
| 352 | |
| 353 | WelsEndDecoder (pCtx); |
| 354 | |
| 355 | if (pCtx->pMemAlign != NULL) { |
| 356 | WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, |
| 357 | "CWelsDecoder::UninitDecoder(), verify memory usage (%d bytes) after free..", |
| 358 | pCtx->pMemAlign->WelsGetMemoryUsage()); |
| 359 | delete pCtx->pMemAlign; |
| 360 | pCtx->pMemAlign = NULL; |
| 361 | } |
| 362 | |
| 363 | if (NULL != pCtx) { |
| 364 | WelsFree (pCtx, "m_pDecContext"); |
| 365 | |
| 366 | pCtx = NULL; |
| 367 | } |
| 368 | if (m_iCtxCount <= 1) m_pDecThrCtx[0].pCtx = NULL; |
| 369 | } |
| 370 | } |
| 371 | |
| 372 | // the return value of this function is not suitable, it need report failure info to upper layer. |
| 373 | int32_t CWelsDecoder::InitDecoder (const SDecodingParam* pParam) { |
nothing calls this directly
no test coverage detected