I struggled making ffmpeg work with CUDA 13 SDK, being a GPU development complete ignorant.
As far as I understand, ffmpeg still uses the non-context versions of the various CUDA functions, deprecated in CUDA SDK 13.
I was helped by the AI to "make it compile", replacing the non-context functions with the relative context ones.
This is a naive patch, mostly because it will always address the GPU with index 0 (in multi-GPU context, this might be a limitation).