summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorPhilip Langdale <philipl@overt.org>2023-06-04 09:56:01 -0700
committerPhilip Langdale <philipl@overt.org>2023-06-04 13:24:52 -0700
commit3a6738ed8c4abb53520d228d419114c0b81a2696 (patch)
treeb64122c8babcbb35adc47c80af248f0543d3d1b5 /video
parent7918545caf7e4ab6ae0e7e7f45e9abde77254c72 (diff)
downloadmpv-3a6738ed8c4abb53520d228d419114c0b81a2696.tar.bz2
mpv-3a6738ed8c4abb53520d228d419114c0b81a2696.tar.xz
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.
Diffstat (limited to 'video')
-rw-r--r--video/out/hwdec/hwdec_cuda_vk.c1
1 files changed, 1 insertions, 0 deletions
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) {