[FFmpeg-devel] [PATCH] hwcontext_vulkan: make 2 public functions always available

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Thu Dec 2 20:13:17 EET 2021


Lynne:
> The issue is that if ffmpeg is compiled without Vulkan, and an API 
> user includes and uses the functions exposed in hwcontext_vulkan.h,
> then a linking error will happen, as the hwcontext_vulkan.c file has
> not been compiled.
> 
> Move the functions to another file, and make it always compiled. The
> functions do not use any Vulkan functions.
> 
> Patch attached.
> 
> 

1. Isn't a linking error exactly what is intended in such cases?
2. And even if not: Actually compiling the whole implementation is
unnecessary; in such cases we typically #if everything away (e.g. in
your case: it will always return NULL).
3. The hwcontext_vulkan.h header requires vulkan system headers; you
can't compile this without it.

- Andreas


More information about the ffmpeg-devel mailing list