From d6bf4c7d7303bb9dfe66500c60ddb4018ce6d874 Mon Sep 17 00:00:00 2001 From: Lynne Date: Thu, 15 Aug 2024 00:52:33 +0200 Subject: [PATCH] hwcontext_vulkan: align host mapping size to minImportedHostPointerAlignment This was left out of the recent rewrite of the system. Signed-off-by: Paul B Mahol --- libavutil/hwcontext_vulkan.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index 3e00781e9e..e4f155db6e 100644 --- a/libavutil/hwcontext_vulkan.c +++ b/libavutil/hwcontext_vulkan.c @@ -3830,6 +3830,7 @@ static int host_map_frame(AVHWFramesContext *hwfc, AVBufferRef **dst, int *nb_bu /* Add the offset at the start, which gets ignored */ buffer_size = offs + swf->linesize[i]*p_h; buffer_size = FFALIGN(buffer_size, p->props.properties.limits.minMemoryMapAlignment); + buffer_size = FFALIGN(buffer_size, p->hprops.minImportedHostPointerAlignment); /* Create a buffer */ vkb = av_mallocz(sizeof(*vkb));