This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch release/9.0 in repository ffmpeg.
commit 30ae65e506cdb6078714e6d808a5dea28fd66fb2 Author: Zhao Zhili <[email protected]> AuthorDate: Thu Jul 9 22:19:44 2026 +0800 Commit: Lynne <[email protected]> CommitDate: Sun Jul 12 13:47:24 2026 +0900 avutil/hwcontext_vulkan: query the actual image format in try_export_flags GetPhysicalDeviceImageFormatProperties2() must be queried with the format that will actually be used to create the image, otherwise the external memory export capability check answers for a different format than the one being allocated. When AV_VK_FRAME_FLAG_DISABLE_MULTIPLANE is set (e.g. by ffplay for CUDA interop), vulkan_frames_init selects the per-plane fallback format via vkfmt_from_pixfmt2(disable_multiplane=1) and stores it in hwctx->format[]. The image is then created with that fallback format. Querying the multiplane vkf instead returns capability for a format that is never instantiated, and on NVIDIA GPUs with OPTIMAL tiling the answer differs between the two formats, producing broken CUDA hwaccel output. Read hwctx->format[0], which is populated by vulkan_frames_init before vulkan_pool_alloc runs, so the query matches the image regardless of whether the multiplane or fallback path was taken. Fix artifacts with `ffplay -hwaccel cuda foo.mp4`. (cherry picked from commit 0baa71b53cd9dc6ecf0cf9a5c271bcbde04135ba) --- libavutil/hwcontext_vulkan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index 2de2de7e93..3da0d3c04d 100644 --- a/libavutil/hwcontext_vulkan.c +++ b/libavutil/hwcontext_vulkan.c @@ -2799,7 +2799,7 @@ static void try_export_flags(AVHWFramesContext *hwfc, VkPhysicalDeviceImageFormatInfo2 pinfo = { .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2, .pNext = !exp ? NULL : &enext, - .format = vk_find_format_entry(hwfc->sw_format)->vkf, + .format = hwctx->format[0], .type = VK_IMAGE_TYPE_2D, .tiling = hwctx->tiling, .usage = hwctx->usage, _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
