From 15c7f7a33968edebe305e2845b32eb2383457d46 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 19 Dec 2012 12:04:57 +0100 Subject: video: cleanup: move and rename vf_mpi_clear and vf_clone_attributes These functions weren't specific to video filters and were misplaced in vf.c. Move them to mp_image.c. Fix the big endian test in vf_mpi_clear/mp_image_clear, which has been messed up in 74df1d. --- video/out/vo_xv.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'video/out/vo_xv.c') diff --git a/video/out/vo_xv.c b/video/out/vo_xv.c index 4f26f195c6..8bfe3e1777 100644 --- a/video/out/vo_xv.c +++ b/video/out/vo_xv.c @@ -47,7 +47,6 @@ #include "vo.h" #include "video/vfcap.h" #include "video/mp_image.h" -#include "video/filter/vf.h" #include "x11_common.h" #include "video/memcpy_pic.h" #include "sub/sub.h" @@ -267,7 +266,7 @@ static void allocate_xvimage(struct vo *vo, int foo) XSync(x11->display, False); } struct mp_image img = get_xv_buffer(vo, foo); - vf_mpi_clear(&img, 0, 0, img.w, img.h); + mp_image_clear(&img, 0, 0, img.w, img.h); return; } @@ -394,9 +393,7 @@ static mp_image_t *get_screenshot(struct vo *vo) struct xvctx *ctx = vo->priv; struct mp_image img = get_xv_buffer(vo, ctx->visible_buf); - struct mp_image *res = alloc_mpi(img.w, img.h, img.imgfmt); - copy_mpi(res, &img); - vf_clone_mpi_attributes(res, &img); + struct mp_image *res = mp_image_new_copy(&img); mp_image_set_display_size(res, vo->aspdat.prew, vo->aspdat.preh); // try to get an image without OSD mp_draw_sub_backup_restore(ctx->osd_backup, res); -- cgit v1.2.3