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

Function ff_alloc_extradata

libavformat/utils.c:237–253  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

235}
236
237int ff_alloc_extradata(AVCodecParameters *par, int size)
238{
239 av_freep(&par->extradata);
240 par->extradata_size = 0;
241
242 if (size < 0 || size >= INT32_MAX - AV_INPUT_BUFFER_PADDING_SIZE)
243 return AVERROR(EINVAL);
244
245 par->extradata = av_malloc(size + AV_INPUT_BUFFER_PADDING_SIZE);
246 if (!par->extradata)
247 return AVERROR(ENOMEM);
248
249 memset(par->extradata + size, 0, AV_INPUT_BUFFER_PADDING_SIZE);
250 par->extradata_size = size;
251
252 return 0;
253}
254
255/*******************************************************/
256

Callers 15

hca_read_headerFunction · 0.85
msf_read_headerFunction · 0.85
hcom_read_headerFunction · 0.85
mka_parse_audio_codecFunction · 0.85
matroska_parse_tracksFunction · 0.85
matroska_read_headerFunction · 0.85
celt_headerFunction · 0.85
oma_read_headerFunction · 0.85
mov_read_iacbFunction · 0.85
mov_read_dopsFunction · 0.85
parse_packed_headersFunction · 0.85
parse_fmtp_configFunction · 0.85

Calls 2

av_freepFunction · 0.85
av_mallocFunction · 0.50

Tested by

no test coverage detected