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

Function WelsInitStaticMemory

codec/decoder/core/src/decoder_core.cpp:758–773  ·  view source on GitHub ↗

* WelsInitStaticMemory * Memory request for new introduced data * Especially for: * rbsp_au_buffer, cur_dq_layer_ptr and ref_dq_layer_ptr in MB info cache. * return: * 0 - success; otherwise returned error_no defined in error_no.h. */

Source from the content-addressed store, hash-verified

756 * 0 - success; otherwise returned error_no defined in error_no.h.
757*/
758int32_t WelsInitStaticMemory (PWelsDecoderContext pCtx) {
759 if (pCtx == NULL) {
760 return ERR_INFO_INVALID_PTR;
761 }
762
763 if (MemInitNalList (&pCtx->pAccessUnitList, MAX_NAL_UNIT_NUM_IN_AU, pCtx->pMemAlign) != 0)
764 return ERR_INFO_OUT_OF_MEMORY;
765
766 if (InitBsBuffer (pCtx) != 0)
767 return ERR_INFO_OUT_OF_MEMORY;
768
769 pCtx->uiTargetDqId = (uint8_t) - 1;
770 pCtx->bEndOfStreamFlag = false;
771
772 return ERR_NONE;
773}
774
775/*
776 * WelsFreeStaticMemory

Callers 1

WelsOpenDecoderFunction · 0.85

Calls 2

MemInitNalListFunction · 0.85
InitBsBufferFunction · 0.85

Tested by

no test coverage detected