PR #21074 opened by Kacper Michajłow (kasper93) URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21074 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21074.patch
From ac05f5aa3f94d7fbcfd0008abe2165c9b6314c14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <[email protected]> Date: Mon, 1 Dec 2025 21:09:34 +0100 Subject: [PATCH 1/3] avdevice/gdigrab: suppress int to pointer cast warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] Signed-off-by: Kacper Michajłow <[email protected]> --- libavdevice/gdigrab.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavdevice/gdigrab.c b/libavdevice/gdigrab.c index 08a41c304b..fa9ba27db0 100644 --- a/libavdevice/gdigrab.c +++ b/libavdevice/gdigrab.c @@ -279,7 +279,7 @@ gdigrab_read_header(AVFormatContext *s1) char *p; name = filename + 5; - hwnd = (HWND) strtoull(name, &p, 0); + hwnd = (HWND)(intptr_t) strtoull(name, &p, 0); if (p == NULL || p == name || p[0] != '\0') { -- 2.49.1 From fd38520e02eea1cb9b43d99cde7357df1c69e9f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <[email protected]> Date: Mon, 1 Dec 2025 21:21:25 +0100 Subject: [PATCH 2/3] fftools/cmdutils: use strcpy directly, the length is computed already MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There is no need to scan for NULL, if we inject it ourselves. Fixes: warning: 'strncat' specified bound 10 equals source length [-Wstringop-overflow=] Signed-off-by: Kacper Michajłow <[email protected]> --- fftools/cmdutils.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index e906d4506d..9a365c228d 100644 --- a/fftools/cmdutils.c +++ b/fftools/cmdutils.c @@ -962,8 +962,7 @@ FILE *get_preset_file(char *filename, size_t filename_size, datadir, desired_size, sizeof *datadir); if (new_datadir) { datadir = new_datadir; - datadir[datadir_len] = 0; - strncat(datadir, "/ffpresets", desired_size - 1 - datadir_len); + strcpy(datadir + datadir_len, "/ffpresets"); base[2] = datadir; } } -- 2.49.1 From 37f7f59beaabf6bc56726ffbd465cf69b43f2919 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <[email protected]> Date: Mon, 1 Dec 2025 21:30:26 +0100 Subject: [PATCH 3/3] 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 <[email protected]> --- 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 c3d8c1d0d9..38ae7b296a 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); /** -- 2.49.1 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
