diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-02-06 19:26:58 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-02-06 19:26:58 +0000 |
commit | 23f4a0d1e29254a0bcd6b3d85633ba37d824ea28 (patch) | |
tree | c76d37e0dcd2669a46b7e77704b270e45f2304fe /libvo/vo_gl.c | |
parent | db7e0242166f6d23a3a797985e859a6f16b83d41 (diff) | |
download | mpv-23f4a0d1e29254a0bcd6b3d85633ba37d824ea28.tar.bz2 mpv-23f4a0d1e29254a0bcd6b3d85633ba37d824ea28.tar.xz |
Avoid calling aspect on each frame and make ass subtitles work better with panscan
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22167 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/vo_gl.c')
-rw-r--r-- | libvo/vo_gl.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c index dcc71d496b..74ffa9a15a 100644 --- a/libvo/vo_gl.c +++ b/libvo/vo_gl.c @@ -108,6 +108,7 @@ static int texture_width; static int texture_height; static int mpi_flipped; static int vo_flipped; +static int ass_border_x, ass_border_y; static unsigned int slice_height = 1; @@ -132,6 +133,8 @@ static void resize(int x,int y){ scale_x = (GLdouble) new_w / (GLdouble) x; scale_y = (GLdouble) new_h / (GLdouble) y; glScaled(scale_x, scale_y, 1); + ass_border_x = (vo_screenwidth - new_w) / 2; + ass_border_y = (vo_screenheight - new_h) / 2; } glOrtho(0, image_width, image_height, 0, -1,1); @@ -959,11 +962,9 @@ static int control(uint32_t request, void *data, ...) r->mt = r->mb = r->ml = r->mr = 0; if (scaled_osd) {r->w = image_width; r->h = image_height;} else if (vo_fs) { - int aw, ah; - aspect(&aw, &ah, A_ZOOM); r->w = vo_screenwidth; r->h = vo_screenheight; - r->ml = r->mr = (vo_screenwidth - aw) / 2; - r->mt = r->mb = (vo_screenheight - ah) / 2; + r->ml = r->mr = ass_border_x > 0 ? ass_border_x : 0; + r->mt = r->mb = ass_border_y > 0 ? ass_border_y : 0; } else { r->w = vo_dwidth; r->h = vo_dheight; } |