diff options
author | wm4 <wm4@nowhere> | 2012-10-20 19:31:44 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-10-20 19:33:58 +0200 |
commit | 8c75a38d5fb5f399a66a79dc08b30e201ac5ef33 (patch) | |
tree | dd9b81011c88b92bbbbceb8e79b03a1e59a79009 /libvo/vo_xv.c | |
parent | 842402c6ca61efcb9d681e86e70d9136bd8d2bf7 (diff) | |
download | mpv-8c75a38d5fb5f399a66a79dc08b30e201ac5ef33.tar.bz2 mpv-8c75a38d5fb5f399a66a79dc08b30e201ac5ef33.tar.xz |
VO: fix screenshot size with -geometry
The -geometry switch works by modifying the d_width/d_height values
passed to VOs. Moreover, d_width/d_height seem to be subject to the
-monitorpixelaspect option. Screenshots should not be influenced by
this. Change screenshot supporting VOs to use the original
d_width/d_height values stored in vo->aspdat.prew/h.
(Not all uses of -geometry did this. E.g. --geometry=900x560+0+20 did.)
Diffstat (limited to 'libvo/vo_xv.c')
-rw-r--r-- | libvo/vo_xv.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c index 42ddde890a..922fd55cf7 100644 --- a/libvo/vo_xv.c +++ b/libvo/vo_xv.c @@ -77,8 +77,6 @@ struct xvctx { uint32_t image_width; uint32_t image_height; uint32_t image_format; - uint32_t image_d_width; - uint32_t image_d_height; int is_paused; struct vo_rect src_rect; struct vo_rect dst_rect; @@ -193,8 +191,6 @@ static int config(struct vo *vo, uint32_t width, uint32_t height, ctx->image_height = height; ctx->image_width = width; ctx->image_format = format; - ctx->image_d_width = d_width; - ctx->image_d_height = d_height; if ((ctx->max_width != 0 && ctx->max_height != 0) && (ctx->image_width > ctx->max_width @@ -517,8 +513,8 @@ static mp_image_t *get_screenshot(struct vo *vo) w, h, image->stride[p2], xv_image->pitches[2]); } - image->w = ctx->image_d_width; - image->h = ctx->image_d_height; + image->w = vo->aspdat.prew; + image->h = vo->aspdat.preh; return image; } |