[FFmpeg-devel] [PATCH 13/13] vulkan: use allocator callback for buffer creation

Lynne dev at lynne.ee
Thu Aug 8 00:35:08 EEST 2024


This would've let to a segfault if custom allocators were used.
---
 libavutil/vulkan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/vulkan.c b/libavutil/vulkan.c
index df7758cc1e..7b45e43a89 100644
--- a/libavutil/vulkan.c
+++ b/libavutil/vulkan.c
@@ -855,7 +855,7 @@ int ff_vk_create_buf(FFVulkanContext *s, FFVkBuffer *buf, size_t size,
         .pNext = &ded_req,
     };
 
-    ret = vk->CreateBuffer(s->hwctx->act_dev, &buf_spawn, NULL, &buf->buf);
+    ret = vk->CreateBuffer(s->hwctx->act_dev, &buf_spawn, s->hwctx->alloc, &buf->buf);
     if (ret != VK_SUCCESS) {
         av_log(s, AV_LOG_ERROR, "Failed to create buffer: %s\n",
                ff_vk_ret2str(ret));
-- 
2.45.2.753.g447d99e1c3b


More information about the ffmpeg-devel mailing list