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

Function InitDecoder

test/decoder/DecUT_ParseSyntax.cpp:83–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81}
82
83int32_t InitDecoder (const SDecodingParam* pParam, PWelsDecoderContext pCtx, SLogContext* pLogCtx) {
84
85
86 if (NULL == pCtx)
87 return cmMallocMemeError;
88
89 if (NULL == pCtx->pMemAlign) {
90 pCtx->pMemAlign = new CMemoryAlign (16);
91 if (NULL == pCtx->pMemAlign)
92 return cmMallocMemeError;
93 }
94
95 pCtx->sLogCtx = *pLogCtx;
96
97 //check param and update decoder context
98 pCtx->pParam = (SDecodingParam*) pCtx->pMemAlign->WelsMallocz (sizeof (SDecodingParam), "SDecodingParam");
99 WELS_VERIFY_RETURN_PROC_IF (cmMallocMemeError, (NULL == pCtx->pParam), UninitDecoder (pCtx));
100 int32_t iRet = DecoderConfigParam (pCtx, pParam);
101 WELS_VERIFY_RETURN_IFNEQ (iRet, cmResultSuccess);
102
103 WELS_VERIFY_RETURN_PROC_IF (cmInitParaError, WelsInitDecoder (pCtx, pLogCtx), UninitDecoder (pCtx));
104
105 return cmResultSuccess;
106}
107
108long Initialize (const SDecodingParam* pParam, PWelsDecoderContext pCtx, SLogContext* pLogCtx) {
109 int iRet = ERR_NONE;

Callers 3

InitializeFunction · 0.85
InitializeMethod · 0.85
ThreadResetDecoderMethod · 0.85

Calls 4

UninitDecoderFunction · 0.85
DecoderConfigParamFunction · 0.85
WelsInitDecoderFunction · 0.85
WelsMalloczMethod · 0.80

Tested by

no test coverage detected