From 9ed71a837b9416a7d1e28335fff3f4a43807addc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= Date: Mon, 1 Dec 2025 21:30:26 +0100 Subject: [PATCH] avutil/vulkan: fix device memory size truncation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit size_t cannot fit VK_WHOLE_SIZE on 32-bit builds. Fixes: warning: conversion from 'long long unsigned int' to 'size_t' {aka 'unsigned int'} changes value from '18446744073709551615' to '4294967295' Signed-off-by: Kacper Michajłow --- libavutil/vulkan.c | 2 +- libavutil/vulkan.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libavutil/vulkan.c b/libavutil/vulkan.c index 3015a536c2..7858e002ed 100644 --- a/libavutil/vulkan.c +++ b/libavutil/vulkan.c @@ -1168,7 +1168,7 @@ int ff_vk_map_buffers(FFVulkanContext *s, FFVkBuffer **buf, uint8_t *mem[], } int ff_vk_flush_buffer(FFVulkanContext *s, FFVkBuffer *buf, - size_t offset, size_t mem_size, + VkDeviceSize offset, VkDeviceSize mem_size, int flush) { VkResult ret; diff --git a/libavutil/vulkan.h b/libavutil/vulkan.h index 868788c2a4..29116bcb2c 100644 --- a/libavutil/vulkan.h +++ b/libavutil/vulkan.h @@ -527,7 +527,7 @@ int ff_vk_create_buf(FFVulkanContext *s, FFVkBuffer *buf, size_t size, * Flush or invalidate a single buffer, with a given size and offset. */ int ff_vk_flush_buffer(FFVulkanContext *s, FFVkBuffer *buf, - size_t offset, size_t mem_size, + VkDeviceSize offset, VkDeviceSize mem_size, int flush); /**