diff options
author | wm4 <wm4@nowhere> | 2012-12-19 12:04:57 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-01-13 20:04:11 +0100 |
commit | 15c7f7a33968edebe305e2845b32eb2383457d46 (patch) | |
tree | d9ac4532c4b2ceb2e7a08f16399dcbfda3eefa7f /video/out/vo_xv.c | |
parent | aa6ba6372c627bc602647d225bdfb076f93bd291 (diff) | |
download | mpv-15c7f7a33968edebe305e2845b32eb2383457d46.tar.bz2 mpv-15c7f7a33968edebe305e2845b32eb2383457d46.tar.xz |
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.
Diffstat (limited to 'video/out/vo_xv.c')
-rw-r--r-- | video/out/vo_xv.c | 7 |
1 files changed, 2 insertions, 5 deletions
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); |