summaryrefslogtreecommitdiffstats
path: root/video/out/hwdec
diff options
context:
space:
mode:
authorAnton Kindestam <antonki@kth.se>2019-09-12 21:00:50 +0200
committerJan Ekström <jeebjp@gmail.com>2019-09-18 23:59:32 +0300
commite08f235578aa6305a41e7c7132225e58bd191ef0 (patch)
tree5a96a85f873f1dc0e117d2fb3fb0191e6e44c462 /video/out/hwdec
parentb04ddcdc0b24c8d594bcb001c964035aa7ebd008 (diff)
downloadmpv-e08f235578aa6305a41e7c7132225e58bd191ef0.tar.bz2
mpv-e08f235578aa6305a41e7c7132225e58bd191ef0.tar.xz
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
Diffstat (limited to 'video/out/hwdec')
-rw-r--r--video/out/hwdec/hwdec_vaapi.c4
1 files changed, 2 insertions, 2 deletions
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);