MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / av_fast_padded_malloc

Function av_fast_padded_malloc

libavcodec/utils.c:53–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51#include <limits.h>
52
53void av_fast_padded_malloc(void *ptr, unsigned int *size, size_t min_size)
54{
55 uint8_t **p = ptr;
56 if (min_size > SIZE_MAX - AV_INPUT_BUFFER_PADDING_SIZE) {
57 av_freep(p);
58 *size = 0;
59 return;
60 }
61 av_fast_mallocz(p, size, min_size + AV_INPUT_BUFFER_PADDING_SIZE);
62 if (*p)
63 memset(*p + min_size, 0, AV_INPUT_BUFFER_PADDING_SIZE);
64}
65
66void av_fast_padded_mallocz(void *ptr, unsigned int *size, size_t min_size)
67{

Callers 15

decode_frame_lscrFunction · 0.85
allocate_buffers2Function · 0.85
allocate_buffersFunction · 0.85
wv_stereoFunction · 0.85
wavpack_encode_blockFunction · 0.85
wavpack_encode_frameFunction · 0.85
mp_decode_frameFunction · 0.85
cllc_decode_frameFunction · 0.85
mpc7_decode_frameFunction · 0.85
cdtoons_decode_frameFunction · 0.85
mobiclip_decodeFunction · 0.85
dwa_uncompressFunction · 0.85

Calls 2

av_freepFunction · 0.85
av_fast_malloczFunction · 0.85

Tested by

no test coverage detected