vo_gpu_next: also include stride alignment in DR size

Fixes #9976
This commit is contained in:
Niklas Haas 2022-03-14 15:43:46 +01:00
parent 23e3be80dc
commit 5ef7bf7a20
1 changed files with 3 additions and 2 deletions

View File

@ -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;