diff options
author | Lynne <dev@lynne.ee> | 2024-08-30 17:09:46 +0000 |
---|---|---|
committer | Lynne <dev@lynne.ee> | 2024-09-09 07:05:43 +0200 |
commit | 06483d039a8ecd162374b25149796b76d1ff6e03 (patch) | |
tree | d335d69a68e71d5d97689986a8a7f88e12565dbc /libavutil/vulkan.c | |
parent | fd86c373c28148483117302935bf51b64141dabb (diff) | |
download | ffmpeg-06483d039a8ecd162374b25149796b76d1ff6e03.tar.gz |
vulkan: error out if query is called without being initialized
Diffstat (limited to 'libavutil/vulkan.c')
-rw-r--r-- | libavutil/vulkan.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavutil/vulkan.c b/libavutil/vulkan.c index fe5affa72a..c2a3b5cfa3 100644 --- a/libavutil/vulkan.c +++ b/libavutil/vulkan.c @@ -446,6 +446,11 @@ VkResult ff_vk_exec_get_query(FFVulkanContext *s, FFVkExecContext *e, if (!e->had_submission) return VK_INCOMPLETE; + if (!e->query_data) { + av_log(s, AV_LOG_ERROR, "Requested a query with a NULL query_data pointer!\n"); + return VK_INCOMPLETE; + } + qf |= pool->query_64bit ? VK_QUERY_RESULT_64_BIT : 0x0; qf |= pool->query_statuses ? |