summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-05-14 19:36:21 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-05-14 19:36:21 +0000
commitae2eafeb554f6dd69697ae937cc8b7ec0b1652de (patch)
tree517a0d1a5bfd9a82e8a0bc361526855b152e20dd /libvo
parent6fd578b711574ba6710ab26ebad6db69f3bddd9c (diff)
downloadmpv-ae2eafeb554f6dd69697ae937cc8b7ec0b1652de.tar.bz2
mpv-ae2eafeb554f6dd69697ae937cc8b7ec0b1652de.tar.xz
do aspect correction of video size before calculating vo_dx and vo_dy.
fixes misplaced video e.g. with -aspect 0.3 (window is not centered but near left border) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18510 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/vo_xmga.c3
-rw-r--r--libvo/vo_xv.c2
-rw-r--r--libvo/vo_xvmc.c2
3 files changed, 3 insertions, 4 deletions
diff --git a/libvo/vo_xmga.c b/libvo/vo_xmga.c
index 31934fdaa3..abf37b3bff 100644
--- a/libvo/vo_xmga.c
+++ b/libvo/vo_xmga.c
@@ -134,6 +134,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
vo_panscan_x = vo_panscan_y = vo_panscan_amount = 0;
+ aspect(&d_width, &d_height, A_NOZOOM);
vo_dx = (vo_screenwidth - d_width) / 2;
vo_dy = (vo_screenheight - d_height) / 2;
geometry(&vo_dx, &vo_dy, &d_width, &d_height, vo_screenwidth,
@@ -171,8 +172,6 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
inited = 1;
- aspect(&d_width, &d_height, A_NOZOOM);
-
#ifdef HAVE_NEW_GUI
if (use_gui)
guiGetEvent(guiSetShVideo, 0); // the GUI will set up / resize the window
diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c
index ac199baf78..b50f1001e3 100644
--- a/libvo/vo_xv.c
+++ b/libvo/vo_xv.c
@@ -191,6 +191,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
visible_buf = -1;
update_xinerama_info();
+ aspect(&d_width, &d_height, A_NOZOOM);
vo_dx = (vo_screenwidth - d_width) / 2;
vo_dy = (vo_screenheight - d_height) / 2;
geometry(&vo_dx, &vo_dy, &d_width, &d_height, vo_screenwidth,
@@ -234,7 +235,6 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
{
hint.x = vo_dx;
hint.y = vo_dy;
- aspect(&d_width, &d_height, A_NOZOOM);
hint.width = d_width;
hint.height = d_height;
#ifdef HAVE_XF86VM
diff --git a/libvo/vo_xvmc.c b/libvo/vo_xvmc.c
index c4594252f6..d8e464ded8 100644
--- a/libvo/vo_xvmc.c
+++ b/libvo/vo_xvmc.c
@@ -605,6 +605,7 @@ found_subpic:
vo_mouse_autohide = 1;
update_xinerama_info();
+ aspect(&d_width,&d_height,A_NOZOOM);
vo_dx=( vo_screenwidth - d_width ) / 2; vo_dy=( vo_screenheight - d_height ) / 2;
geometry(&vo_dx, &vo_dy, &d_width, &d_height, vo_screenwidth, vo_screenheight);
vo_dx += xinerama_x;
@@ -623,7 +624,6 @@ found_subpic:
{
hint.x = vo_dx;
hint.y = vo_dy;
- aspect(&d_width,&d_height,A_NOZOOM);
hint.width = d_width;
hint.height = d_height;
#ifdef HAVE_XF86VM