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

Function av_buffer_pool_init

libavutil/buffer.c:283–300  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

281}
282
283AVBufferPool *av_buffer_pool_init(size_t size, AVBufferRef* (*alloc)(size_t size))
284{
285 AVBufferPool *pool = av_mallocz(sizeof(*pool));
286 if (!pool)
287 return NULL;
288
289 if (ff_mutex_init(&pool->mutex, NULL)) {
290 av_free(pool);
291 return NULL;
292 }
293
294 pool->size = size;
295 pool->alloc = alloc ? alloc : av_buffer_alloc;
296
297 atomic_init(&pool->refcount, 1);
298
299 return pool;
300}
301
302static void buffer_pool_flush(AVBufferPool *pool)
303{

Callers 9

buffer_pool_getFunction · 0.85
qsv_decode_init_contextFunction · 0.85
nvdec_init_hwframesFunction · 0.85
get_frame_bufferFunction · 0.85
get_output_refFunction · 0.85
update_frame_poolFunction · 0.85
ff_frame_pool_video_initFunction · 0.85
ff_frame_pool_audio_initFunction · 0.85

Calls 3

ff_mutex_initFunction · 0.85
av_malloczFunction · 0.70
av_freeFunction · 0.70

Tested by

no test coverage detected