From 3cb9e93cdf8a71154a70d0cfa1e0676905d5a436 Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Sat, 16 May 2020 15:25:58 -0700 Subject: vo_wlshm, vo_drm: set image size with mp_image_set_size The image w and h members must match params.w and params.h, so should not be changed directly. The helper function mp_image_set_size is designed for this purpose, so just use that instead. This prevents an assertion error with the rewritten draw_bmp. Fixes #7721. --- video/out/vo_wlshm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'video/out/vo_wlshm.c') diff --git a/video/out/vo_wlshm.c b/video/out/vo_wlshm.c index 40c5b0da0f..3583ce3e73 100644 --- a/video/out/vo_wlshm.c +++ b/video/out/vo_wlshm.c @@ -112,8 +112,7 @@ static struct buffer *buffer_create(struct vo *vo, int width, int height) buf->vo = vo; buf->size = size; mp_image_set_params(&buf->mpi, &p->sws->dst); - buf->mpi.w = width; - buf->mpi.h = height; + mp_image_set_size(&buf->mpi, width, height); buf->mpi.planes[0] = data; buf->mpi.stride[0] = stride; buf->pool = wl_shm_create_pool(wl->shm, fd, size); -- cgit v1.2.3