MCPcopy Create free account
hub / github.com/cisco/openh264 / UninitDecoderCtx

Method UninitDecoderCtx

codec/decoder/plus/src/welsDecoderExt.cpp:347–370  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

345}
346
347void 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.
373int32_t CWelsDecoder::InitDecoder (const SDecodingParam* pParam) {

Callers

nothing calls this directly

Calls 4

WelsLogFunction · 0.85
WelsEndDecoderFunction · 0.85
WelsGetMemoryUsageMethod · 0.80
WelsFreeFunction · 0.50

Tested by

no test coverage detected