summaryrefslogtreecommitdiffstats
path: root/libvo/vo_opengl_old.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_opengl_old.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_opengl_old.c')
-rw-r--r--libvo/vo_opengl_old.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/libvo/vo_opengl_old.c b/libvo/vo_opengl_old.c
index d302504846..dcb1103b8e 100644
--- a/libvo/vo_opengl_old.c
+++ b/libvo/vo_opengl_old.c
@@ -95,8 +95,6 @@ struct gl_priv {
uint32_t image_width;
uint32_t image_height;
uint32_t image_format;
- uint32_t image_d_width;
- uint32_t image_d_height;
int many_fmts;
int have_texture_rg;
int ati_hack;
@@ -615,8 +613,6 @@ static int config(struct vo *vo, uint32_t width, uint32_t height,
p->image_height = height;
p->image_width = width;
p->image_format = format;
- p->image_d_width = d_width;
- p->image_d_height = d_height;
p->is_yuv = mp_get_chroma_shift(p->image_format, &xs, &ys, NULL) > 0;
p->is_yuv |= (xs << 8) | (ys << 16);
glFindFormat(format, p->have_texture_rg, NULL, &p->texfmt, &p->gl_format,
@@ -1092,8 +1088,8 @@ static mp_image_t *get_screenshot(struct vo *vo)
image->width = p->image_width;
image->height = p->image_height;
- image->w = p->image_d_width;
- image->h = p->image_d_height;
+ image->w = vo->aspdat.prew;
+ image->h = vo->aspdat.preh;
return image;
}