mirror of
https://github.com/mpv-player/mpv
synced 2025-01-20 22:40:52 +00:00
parent
23e3be80dc
commit
5ef7bf7a20
@ -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) {
|
pl_buf buf = pl_buf_create(gpu, &(struct pl_buf_params) {
|
||||||
.memory_type = PL_BUF_MEM_HOST,
|
.memory_type = PL_BUF_MEM_HOST,
|
||||||
.host_mapped = true,
|
.host_mapped = true,
|
||||||
.size = size,
|
.size = size + stride_align,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!buf)
|
if (!buf)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
struct mp_image *mpi = mp_image_from_buffer(imgfmt, w, h, stride_align,
|
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) {
|
if (!mpi) {
|
||||||
pl_buf_destroy(gpu, &buf);
|
pl_buf_destroy(gpu, &buf);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user