summaryrefslogtreecommitdiffstats
path: root/libvo/vo_vdpau.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-10-20 19:31:44 +0200
committerwm4 <wm4@nowhere>2012-10-20 19:33:58 +0200
commit8c75a38d5fb5f399a66a79dc08b30e201ac5ef33 (patch)
treedd9b81011c88b92bbbbceb8e79b03a1e59a79009 /libvo/vo_vdpau.c
parent842402c6ca61efcb9d681e86e70d9136bd8d2bf7 (diff)
downloadmpv-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_vdpau.c')
-rw-r--r--libvo/vo_vdpau.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/libvo/vo_vdpau.c b/libvo/vo_vdpau.c
index 594829b394..053405a806 100644
--- a/libvo/vo_vdpau.c
+++ b/libvo/vo_vdpau.c
@@ -155,7 +155,6 @@ struct vdpctx {
bool dropped_frame;
uint64_t dropped_time;
uint32_t vid_width, vid_height;
- uint32_t vid_d_width, vid_d_height;
uint32_t image_format;
VdpChromaType vdp_chroma_type;
VdpYCbCrFormat vdp_pixel_format;
@@ -880,8 +879,6 @@ static int config(struct vo *vo, uint32_t width, uint32_t height,
vc->image_format = format;
vc->vid_width = width;
vc->vid_height = height;
- vc->vid_d_width = d_width;
- vc->vid_d_height = d_height;
free_video_specific(vo);
if (IMGFMT_IS_VDPAU(vc->image_format) && !create_vdp_decoder(vo, 2))
@@ -1531,8 +1528,8 @@ static struct mp_image *get_screenshot(struct vo *vo)
image->width = vc->vid_width;
image->height = vc->vid_height;
- image->w = vc->vid_d_width;
- image->h = vc->vid_d_height;
+ image->w = vo->aspdat.prew;
+ image->h = vo->aspdat.preh;
return image;
}