From 3a6738ed8c4abb53520d228d419114c0b81a2696 Mon Sep 17 00:00:00 2001 From: Philip Langdale Date: Sun, 4 Jun 2023 09:56:01 -0700 Subject: [PATCH] hwdec_cuda: clear vulkan semaphore fd after passing ownership to cuda This is not technically necessary, because we never touch the fd again after passing to cuda, but having it there could lead to future code accidentally using it. --- video/out/hwdec/hwdec_cuda_vk.c | 1 + 1 file changed, 1 insertion(+) diff --git a/video/out/hwdec/hwdec_cuda_vk.c b/video/out/hwdec/hwdec_cuda_vk.c index 49f266f72e..396b659db9 100644 --- a/video/out/hwdec/hwdec_cuda_vk.c +++ b/video/out/hwdec/hwdec_cuda_vk.c @@ -176,6 +176,7 @@ static bool cuda_ext_vk_init(struct ra_hwdec_mapper *mapper, if (ret < 0) goto error; // CUDA takes ownership of an imported FD *but not* an imported Handle. + evk->sem_handle.fd = -1; #else evk->sync = pl_sync_create(gpu, HANDLE_TYPE); if (!evk->sync) {