Skip to content

nvcodec: fix crash on win32 (x86) + some cleanups

commit 7e93ae06:

nvcodec: cuda.h only needs glib.h, not gst.h
Just a nitpick. Also, force the compiler to use our stub header
instead of searching for it in the include paths.

commit 586d5fc8:

nvcodec: Fix crash on 32-bit Windows
We weren't using the correct calling convention when calling CUDA and
CUVID APIs. `CUDAAPI` is `__stdcall` on Windows. This was working fine
on x64 because `__stdcall` is ignored and there's no special calling
convention. However, on x86, we need to use `__stdcall`.

commit 013ee579:

nvcodec: Print debug info when initializing nvenc
We weren't printing the return value.

This was a regression from 1.16 after we moved to using a vtable of function pointers + dynamic loading of the nvcuda/nvcuvid/etc libraries.

CC: @seungha.yang

Edited by Tim-Philipp Müller

Merge request reports