This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch release/8.1 in repository ffmpeg.
commit fc94e5adbca45f94cc6ea8263e940300d3e3d2ae Author: Tymur Boiko <[email protected]> AuthorDate: Sat Apr 11 01:36:06 2026 +0200 Commit: Lynne <[email protected]> CommitDate: Sun Sep 27 22:53:24 2026 +0000 vulkan: fix -Wdiscarded-qualifiers warning and misleading DRM modifier log ff_vk_find_struct returns const void *, so storing it in const void *drm_create_pnext fixes the initialization warning but then dpb_hwfc->create_pnext = drm_create_pnext assigns const void * to void *, triggering the same warning at that line. The right fix is a (void *) cast at the call site, same as done for buf_pnext. Also restrict the GetPhysicalDeviceImageFormatProperties2 verbose log in try_export_flags to the DRM modifier path only: when has_mods is false the log always printed mod[0]=0x0, which is misleading since no DRM modifier is involved. Signed-off-by: Tymur Boiko <[email protected]> (cherry picked from commit f7ca6f74816311efa07e0cf6db6c7522b4bb847c) Assisted-by: Fairy --- libavcodec/vulkan_decode.c | 4 ++-- libavutil/hwcontext_vulkan.c | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/libavcodec/vulkan_decode.c b/libavcodec/vulkan_decode.c index afca62b304..b4df8b971e 100644 --- a/libavcodec/vulkan_decode.c +++ b/libavcodec/vulkan_decode.c @@ -1399,8 +1399,8 @@ int ff_vk_decode_init(AVCodecContext *avctx) /* Reference (DPB) images use the same tiling and pNext chain as output. * If VK_VIDEO_DECODE_CAPABILITY_DPB_AND_OUTPUT_DISTINCT_BIT_KHR is 0, the * driver does not support separate output and DPB with different layouts/tiling. */ - void *drm_create_pnext = ff_vk_find_struct(ctx->s.hwfc->create_pnext, - VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT); + void *drm_create_pnext = (void *)ff_vk_find_struct(ctx->s.hwfc->create_pnext, + VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT); if (drm_create_pnext) { dpb_hwfc->create_pnext = drm_create_pnext; dpb_hwfc->tiling = VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT; diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index ec651f65db..942ad726de 100644 --- a/libavutil/hwcontext_vulkan.c +++ b/libavutil/hwcontext_vulkan.c @@ -2883,9 +2883,10 @@ static void try_export_flags(AVHWFramesContext *hwfc, ret = vk->GetPhysicalDeviceImageFormatProperties2(dev_hwctx->phys_dev, &pinfo, &props); - av_log(hwfc, AV_LOG_VERBOSE, "GetPhysicalDeviceImageFormatProperties2: mod[%d]=0x%llx -> %s\n", - i, has_mods ? (unsigned long long)phy_dev_mod_info.drmFormatModifier : 0ULL, - ret == VK_SUCCESS ? "OK" : "FAIL"); + if (has_mods) + av_log(hwfc, AV_LOG_VERBOSE, "GetPhysicalDeviceImageFormatProperties2: mod[%d]=0x%llx -> %s\n", + i, (unsigned long long)phy_dev_mod_info.drmFormatModifier, + ret == VK_SUCCESS ? "OK" : "FAIL"); if (ret == VK_SUCCESS) { *iexp |= exp; *comp_handle_types |= eprops.externalMemoryProperties.compatibleHandleTypes; -- To stop receiving notification emails like this one, please contact [email protected]. _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
