From 5ef7bf7a20cd237225c7caae875f84ecdf1d18d2 Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Mon, 14 Mar 2022 15:43:46 +0100 Subject: vo_gpu_next: also include stride alignment in DR size Fixes #9976 --- video/out/vo_gpu_next.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'video/out') diff --git a/video/out/vo_gpu_next.c b/video/out/vo_gpu_next.c index 39321871eb..592b96f2df 100644 --- a/video/out/vo_gpu_next.c +++ b/video/out/vo_gpu_next.c @@ -205,14 +205,15 @@ static struct mp_image *get_image(struct vo *vo, int imgfmt, int w, int h, pl_buf buf = pl_buf_create(gpu, &(struct pl_buf_params) { .memory_type = PL_BUF_MEM_HOST, .host_mapped = true, - .size = size, + .size = size + stride_align, }); if (!buf) return NULL; struct mp_image *mpi = mp_image_from_buffer(imgfmt, w, h, stride_align, - buf->data, size, p, free_dr_buf); + buf->data, buf->params.size, + p, free_dr_buf); if (!mpi) { pl_buf_destroy(gpu, &buf); return NULL; -- cgit v1.2.3