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/gpu/libmpv_gpu.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'video/out/gpu') diff --git a/video/out/gpu/libmpv_gpu.c b/video/out/gpu/libmpv_gpu.c index 5ca4ebb7ca..b8edc694db 100644 --- a/video/out/gpu/libmpv_gpu.c +++ b/video/out/gpu/libmpv_gpu.c @@ -32,14 +32,14 @@ static const struct native_resource_entry native_resource_map[] = { .name = "wl", .size = 0, }, - [MPV_RENDER_PARAM_DRM_DISPLAY] = { - .name = "drm_params", - .size = sizeof (mpv_opengl_drm_params), - }, [MPV_RENDER_PARAM_DRM_DRAW_SURFACE_SIZE] = { .name = "drm_draw_surface_size", .size = sizeof (mpv_opengl_drm_draw_surface_size), }, + [MPV_RENDER_PARAM_DRM_DISPLAY_V2] = { + .name = "drm_params_v2", + .size = sizeof (mpv_opengl_drm_params_v2), + }, }; static int init(struct render_backend *ctx, mpv_render_param *params) -- cgit v1.2.3