summaryrefslogtreecommitdiffstats
path: root/video/out
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.dev>2022-03-14 15:43:46 +0100
committerNiklas Haas <git@haasn.dev>2022-03-14 15:45:36 +0100
commit5ef7bf7a20cd237225c7caae875f84ecdf1d18d2 (patch)
treea63d69f878122cc7be143b92901a6a90c0f9b4c1 /video/out
parent23e3be80dc590ba7a58066812f068c3031eb0b4a (diff)
downloadmpv-5ef7bf7a20cd237225c7caae875f84ecdf1d18d2.tar.bz2
mpv-5ef7bf7a20cd237225c7caae875f84ecdf1d18d2.tar.xz
vo_gpu_next: also include stride alignment in DR size
Fixes #9976
Diffstat (limited to 'video/out')
-rw-r--r--video/out/vo_gpu_next.c5
1 files changed, 3 insertions, 2 deletions
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;