summaryrefslogtreecommitdiffstats
path: root/video/out/vo_x11.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/vo_x11.c')
-rw-r--r--video/out/vo_x11.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/video/out/vo_x11.c b/video/out/vo_x11.c
index 4bdb209891..5a81648233 100644
--- a/video/out/vo_x11.c
+++ b/video/out/vo_x11.c
@@ -449,8 +449,7 @@ static mp_image_t *get_screenshot(struct vo *vo)
struct priv *p = vo->priv;
struct mp_image img = get_x_buffer(p);
- struct mp_image *res = alloc_mpi(img.w, img.h, img.imgfmt);
- copy_mpi(res, &img);
+ struct mp_image *res = mp_image_new_copy(&img);
mp_draw_sub_backup_restore(p->osd_backup, res);
return res;