diff options
Diffstat (limited to 'video/out/hwdec')
-rw-r--r-- | video/out/hwdec/hwdec_cuda_vk.c | 2 | ||||
-rw-r--r-- | video/out/hwdec/hwdec_vaapi.c | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/video/out/hwdec/hwdec_cuda_vk.c b/video/out/hwdec/hwdec_cuda_vk.c index f6fc49daa8..e744ff628a 100644 --- a/video/out/hwdec/hwdec_cuda_vk.c +++ b/video/out/hwdec/hwdec_cuda_vk.c @@ -25,6 +25,8 @@ #include <libavutil/hwcontext_cuda.h> #include <libplacebo/vulkan.h> +#include "osdep/io.h" + #if HAVE_WIN32_DESKTOP #include <versionhelpers.h> #define HANDLE_TYPE PL_HANDLE_WIN32 diff --git a/video/out/hwdec/hwdec_vaapi.c b/video/out/hwdec/hwdec_vaapi.c index 6080ce9e05..504880ad4e 100644 --- a/video/out/hwdec/hwdec_vaapi.c +++ b/video/out/hwdec/hwdec_vaapi.c @@ -84,16 +84,18 @@ static const struct va_create_native create_native_cbs[] = { #if HAVE_VAAPI_DRM {"drm", create_drm_va_display}, #endif + {0} }; static VADisplay *create_native_va_display(struct ra *ra, struct mp_log *log) { - for (int n = 0; n < MP_ARRAY_SIZE(create_native_cbs); n++) { - const struct va_create_native *disp = &create_native_cbs[n]; + const struct va_create_native *disp = create_native_cbs; + while (disp->name) { mp_verbose(log, "Trying to open a %s VA display...\n", disp->name); VADisplay *display = disp->create(ra); if (display) return display; + disp++; } return NULL; } |