diff --git a/libavutil/vulkan.c b/libavutil/vulkan.c index 7ad938b047..4a194ff082 100644 --- a/libavutil/vulkan.c +++ b/libavutil/vulkan.c @@ -646,7 +646,7 @@ int ff_vk_exec_add_dep_bool_sem(FFVulkanContext *s, FFVkExecContext *e, return 0; } - buf_size = sizeof(int) + sizeof(VkSemaphore)*nb; + buf_size = sizeof(*ts) + sizeof(VkSemaphore)*nb; ts = av_mallocz(buf_size); if (!ts) { err = AVERROR(ENOMEM);