[FFmpeg-devel] [PATCH v3 01/10] hwcontext_vulkan: explicitly wait when uploading
Lynne
dev at lynne.ee
Fri Nov 15 06:50:05 EET 2024
---
libavutil/hwcontext_vulkan.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
index 0b52ad5112..0c9047f4c6 100644
--- a/libavutil/hwcontext_vulkan.c
+++ b/libavutil/hwcontext_vulkan.c
@@ -4200,13 +4200,12 @@ static int vulkan_transfer_frame(AVHWFramesContext *hwfc,
}
err = ff_vk_exec_submit(&p->vkctx, exec);
- if (err < 0) {
+ if (err < 0)
ff_vk_exec_discard_deps(&p->vkctx, exec);
- } else if (!upload) {
- ff_vk_exec_wait(&p->vkctx, exec);
- if (!host_mapped)
- err = copy_buffer_data(hwfc, bufs[0], swf, region, planes, 0);
- }
+
+ ff_vk_exec_wait(&p->vkctx, exec);
+ if (!upload && !host_mapped)
+ err = copy_buffer_data(hwfc, bufs[0], swf, region, planes, 0);
end:
for (int i = 0; i < nb_bufs; i++)
--
2.45.2.753.g447d99e1c3b
More information about the ffmpeg-devel
mailing list