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

Function DestroyPicBuff

codec/decoder/core/src/decoder.cpp:260–291  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

258}
259
260void DestroyPicBuff (PWelsDecoderContext pCtx, PPicBuff* ppPicBuf, CMemoryAlign* pMa) {
261 PPicBuff pPicBuf = NULL;
262
263 ResetReorderingPictureBuffers (pCtx->pPictReoderingStatus, pCtx->pPictInfoList, false);
264
265 if (NULL == ppPicBuf || NULL == *ppPicBuf)
266 return;
267
268 pPicBuf = *ppPicBuf;
269 while (pPicBuf->ppPic != NULL) {
270 int32_t iPicIdx = 0;
271 while (iPicIdx < pPicBuf->iCapacity) {
272 PPicture pPic = pPicBuf->ppPic[iPicIdx];
273 if (pPic != NULL) {
274 FreePicture (pPic, pMa);
275 }
276 pPic = NULL;
277 ++ iPicIdx;
278 }
279
280 pMa->WelsFree (pPicBuf->ppPic, "pPicBuf->queue");
281
282 pPicBuf->ppPic = NULL;
283 }
284 pPicBuf->iCapacity = 0;
285 pPicBuf->iCurrentIdx = 0;
286
287 pMa->WelsFree (pPicBuf, "pPicBuf");
288
289 pPicBuf = NULL;
290 *ppPicBuf = NULL;
291}
292
293//reset picture reodering buffer list
294void ResetReorderingPictureBuffers (PPictReoderingStatus pPictReoderingStatus, PPictInfo pPictInfo,

Callers 5

CreatePicBuffFunction · 0.85
IncreasePicBuffFunction · 0.85
DecreasePicBuffFunction · 0.85
WelsRequestMemFunction · 0.85
WelsFreeDynamicMemoryFunction · 0.85

Calls 3

WelsFreeMethod · 0.80
FreePictureFunction · 0.70

Tested by

no test coverage detected