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

James Almer jamrial at gmail.com
Thu Dec 2 20:09:12 EET 2021


On Thu, Dec 2, 2021 at 3:01 PM Lynne <dev at lynne.ee> wrote:

> 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.
>

Do what avcodec/d3d11va.c does in this new file and return NULL/ENOSYS when
CONFIG_VULKAN is 0. You have to because all the Vulkan pixfmt defines will
not be available on environments without the Vulkan headers.


More information about the ffmpeg-devel mailing list