diff options
author | Dave Craig <dcraig@brightsign.biz> | 2022-10-27 10:19:07 +0100 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2022-10-27 18:41:37 +0000 |
commit | 6e274dc8d8f10242693e564a19217f0646b9a4b4 (patch) | |
tree | 914d3e1195eab90d317acf7f963c29852bf3b74c | |
parent | bc3e96098dbe3efbdffdadc44ebc44b532709deb (diff) | |
download | mpv-6e274dc8d8f10242693e564a19217f0646b9a4b4.tar.bz2 mpv-6e274dc8d8f10242693e564a19217f0646b9a4b4.tar.xz |
vo_dmabuf_wayland: fix DRM builds with no VAAPI
Building on DRM platform without VAAPI broke because of misuse of
HAVE_VAAPI with #ifdef in place of #if. Also, the hwcontext_drm.h
header is not required for VAAPI builds, only DRM builds.
-rw-r--r-- | video/out/vo_dmabuf_wayland.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/video/out/vo_dmabuf_wayland.c b/video/out/vo_dmabuf_wayland.c index 17ead0066d..4b4c1c06dd 100644 --- a/video/out/vo_dmabuf_wayland.c +++ b/video/out/vo_dmabuf_wayland.c @@ -20,8 +20,10 @@ #include "config.h" -#ifdef HAVE_VAAPI +#if HAVE_VAAPI #include <va/va_drmcommon.h> +#endif +#if HAVE_DRM #include <libavutil/hwcontext_drm.h> #endif @@ -33,7 +35,9 @@ #include "gpu/hwdec.h" #include "gpu/video.h" +#if HAVE_VAAPI #include "video/vaapi.h" +#endif #include "present_sync.h" #include "wayland_common.h" #include "generated/wayland/linux-dmabuf-unstable-v1.h" @@ -53,12 +57,12 @@ struct priv { bool want_reset; uint64_t reset_count; -#ifdef HAVE_VAAPI +#if HAVE_VAAPI VADisplay display; #endif }; -#ifdef HAVE_VAAPI +#if HAVE_VAAPI static uintptr_t vaapi_key_provider(struct mp_image *src) { return va_surface_id(src); |