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

Function WelsRealloc

codec/processing/src/common/memory.cpp:94–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92/////////////////////////////////////////////////////////////////////////////
93
94void* WelsRealloc (void* pPointer, uint32_t* pRealSize, const uint32_t kuiSize, char* pTag) {
95 const uint32_t kuiOldSize = *pRealSize;
96 uint32_t kuiNewSize = 0;
97 void* pLocalPointer = NULL;
98 if (kuiOldSize >= kuiSize) // large enough of original block, so do nothing
99 return (pPointer);
100
101 // new request
102 kuiNewSize = kuiSize + 15;
103 kuiNewSize -= (kuiNewSize & 15);
104 kuiNewSize += 32;
105
106 pLocalPointer = InternalReallocate (pPointer, kuiNewSize, pTag);
107 if (NULL != pLocalPointer) {
108 *pRealSize = kuiNewSize;
109 return (pLocalPointer);
110 } else {
111 return NULL;
112 }
113
114 return NULL; // something wrong
115}
116
117WELSVP_NAMESPACE_END

Callers

nothing calls this directly

Calls 1

InternalReallocateFunction · 0.85

Tested by

no test coverage detected