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

Function alloc_data_buf

libavutil/vulkan.c:1273–1284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1271}
1272
1273static AVBufferRef *alloc_data_buf(void *opaque, size_t size)
1274{
1275 AVBufferRef *ref;
1276 uint8_t *buf = av_mallocz(size);
1277 if (!buf)
1278 return NULL;
1279
1280 ref = av_buffer_create(buf, size, free_data_buf, opaque, 0);
1281 if (!ref)
1282 av_free(buf);
1283 return ref;
1284}
1285
1286int ff_vk_get_pooled_buffer(FFVulkanContext *ctx, AVBufferPool **buf_pool,
1287 AVBufferRef **buf, VkBufferUsageFlags usage,

Callers

nothing calls this directly

Calls 3

av_buffer_createFunction · 0.85
av_malloczFunction · 0.70
av_freeFunction · 0.70

Tested by

no test coverage detected