summaryrefslogtreecommitdiffstats
path: root/libvo/vo_fbdev.c
diff options
context:
space:
mode:
authorpacman <pacman@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-03-04 20:00:06 +0000
committerpacman <pacman@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-03-04 20:00:06 +0000
commit34e08d15ea67689c45692e80555f3a62c6eb58a2 (patch)
tree5321afc1448f3a5f99c449c749d2d7bbfe49a0b0 /libvo/vo_fbdev.c
parent1cbeb57911519b0c3f2a1974e877585115709fa3 (diff)
downloadmpv-34e08d15ea67689c45692e80555f3a62c6eb58a2.tar.bz2
mpv-34e08d15ea67689c45692e80555f3a62c6eb58a2.tar.xz
When centering a video with odd width, be sure to start on a pixel boundary.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17729 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/vo_fbdev.c')
-rw-r--r--libvo/vo_fbdev.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libvo/vo_fbdev.c b/libvo/vo_fbdev.c
index e4ca88cf89..a61fac69c9 100644
--- a/libvo/vo_fbdev.c
+++ b/libvo/vo_fbdev.c
@@ -1005,8 +1005,9 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
return 1;
}
- center = frame_buffer + (out_width - in_width) * fb_pixel_size /
- 2 + ( (out_height - in_height) / 2 ) * fb_line_len +
+ center = frame_buffer +
+ ( (out_width - in_width) / 2 ) * fb_pixel_size +
+ ( (out_height - in_height) / 2 ) * fb_line_len +
x_offset * fb_pixel_size + y_offset * fb_line_len;
mp_msg(MSGT_VO, MSGL_DBG2, "frame_buffer @ %p\n", frame_buffer);