From e08f235578aa6305a41e7c7132225e58bd191ef0 Mon Sep 17 00:00:00 2001 From: Anton Kindestam Date: Thu, 12 Sep 2019 21:00:50 +0200 Subject: drm: fix libmpv ABI breakage introduced in 351c083487050c88adb0e3d60f2174850f869018 Extending the client-allocated mpv_opengl_drm_params struct constituted a break of ABI that could cause UB. Create a clean break by deprecating "drm_params" and related structs and enum values, and replacing it with "drm_params_v2". Also fix some comments and code that wrongly assumed that open could return any other negative number than -1 for failure. This commit updates the libmpv version to 1.104 --- video/out/hwdec/hwdec_vaapi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'video/out/hwdec/hwdec_vaapi.c') diff --git a/video/out/hwdec/hwdec_vaapi.c b/video/out/hwdec/hwdec_vaapi.c index 6b78b37e42..ee15214884 100644 --- a/video/out/hwdec/hwdec_vaapi.c +++ b/video/out/hwdec/hwdec_vaapi.c @@ -56,8 +56,8 @@ static VADisplay *create_wayland_va_display(struct ra *ra) static VADisplay *create_drm_va_display(struct ra *ra) { - mpv_opengl_drm_params *params = ra_get_native_resource(ra, "drm_params"); - if (!params || params->render_fd < 0) + mpv_opengl_drm_params_v2 *params = ra_get_native_resource(ra, "drm_params_v2"); + if (!params || params->render_fd == -1) return NULL; return vaGetDisplayDRM(params->render_fd); -- cgit v1.2.3