[FFmpeg-cvslog] lavu/vulkan: fix handle type for 32-bit targets

Kacper Michajłow git at videolan.org
Thu Mar 9 13:56:38 EET 2023


ffmpeg | branch: release/5.1 | Kacper Michajłow <kasper93 at gmail.com> | Thu Mar  2 17:27:30 2023 +0100| [52d055b34d09601b54c07f31220842c1fd90d150] | committer: Martin Storsjö

lavu/vulkan: fix handle type for 32-bit targets

Fixes compilation with clang which errors out on Wint-conversion.

Signed-off-by: Kacper Michajłow <kasper93 at gmail.com>
Signed-off-by: Martin Storsjö <martin at martin.st>
(cherry picked from commit cc76e8340d28438c1ac56ee7dfd774d25e944264)
Signed-off-by: Martin Storsjö <martin at martin.st>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=52d055b34d09601b54c07f31220842c1fd90d150
---

 libavutil/hwcontext_vulkan.c | 2 +-
 libavutil/vulkan.h           | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
index 5981016cf4..c6bbc9891f 100644
--- a/libavutil/hwcontext_vulkan.c
+++ b/libavutil/hwcontext_vulkan.c
@@ -1145,7 +1145,7 @@ static void free_exec_ctx(AVHWFramesContext *hwfc, VulkanExecCtx *cmd)
 
     av_freep(&cmd->queues);
     av_freep(&cmd->bufs);
-    cmd->pool = NULL;
+    cmd->pool = VK_NULL_HANDLE;
 }
 
 static VkCommandBuffer get_buf_exec_ctx(AVHWFramesContext *hwfc, VulkanExecCtx *cmd)
diff --git a/libavutil/vulkan.h b/libavutil/vulkan.h
index d1ea1e24fb..90922c6cf3 100644
--- a/libavutil/vulkan.h
+++ b/libavutil/vulkan.h
@@ -122,7 +122,11 @@ typedef struct FFVulkanPipeline {
     VkDescriptorSetLayout         *desc_layout;
     VkDescriptorPool               desc_pool;
     VkDescriptorSet               *desc_set;
+#if VK_USE_64_BIT_PTR_DEFINES == 1
     void                         **desc_staging;
+#else
+    uint64_t                      *desc_staging;
+#endif
     VkDescriptorSetLayoutBinding **desc_binding;
     VkDescriptorUpdateTemplate    *desc_template;
     int                           *desc_set_initialized;



More information about the ffmpeg-cvslog mailing list