This is an automated email from the git hooks/post-receive script.
Git pushed a commit to branch master
in repository ffmpeg.
The following commit(s) were added to refs/heads/master by this push:
new 1814fc7e4a avutil/hwcontext_cuda: fail derive if no CUDA device matches
1814fc7e4a is described below
commit 1814fc7e4a79229e1fcd34a2ed5b8b6f53f9f23d
Author: KawaiiEngine (Sashimiso)
<[email protected]>
AuthorDate: Sat Jul 11 22:32:21 2026 +0900
Commit: Timo Rothenpieler <[email protected]>
CommitDate: Sat Jul 11 17:17:04 2026 +0000
avutil/hwcontext_cuda: fail derive if no CUDA device matches
When CUDA enumeration succeeds but none of the device UUIDs matches the
source Vulkan device, ret still holds zero from the last successful CUDA
call. The error path therefore uninitializes the destination and returns
success.
av_hwdevice_ctx_create_derived() then returns a CUDA device context without
a CUDA context. Later frame allocation fails with an unrelated error.
Set ret to AVERROR(ENODEV) for the no-match case, consistent with equivalent
Vulkan and OpenCL device selection failures.
Signed-off-by: KawaiiEngine (Sashimiso)
<[email protected]>
---
libavutil/hwcontext_cuda.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavutil/hwcontext_cuda.c b/libavutil/hwcontext_cuda.c
index f93bdcab9c..a171a9e139 100644
--- a/libavutil/hwcontext_cuda.c
+++ b/libavutil/hwcontext_cuda.c
@@ -557,6 +557,7 @@ static int cuda_device_derive(AVHWDeviceContext *device_ctx,
if (hwctx->internal->cuda_device == -1) {
av_log(device_ctx, AV_LOG_ERROR, "Could not derive CUDA device.\n");
+ ret = AVERROR(ENODEV);
goto error;
}
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]