summaryrefslogtreecommitdiffstats
path: root/libvo/vo_vdpau.c
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-02-17 11:59:49 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-02-17 11:59:49 +0000
commit01ef7e45790e1f0dd2277f73c583c9a503b2b6bd (patch)
treee513cf8669a9f80b1a9e77fe4e41b449d6f5a1ac /libvo/vo_vdpau.c
parenta845504a5ee6fd7e545f028cf84e1e503da574c1 (diff)
downloadmpv-01ef7e45790e1f0dd2277f73c583c9a503b2b6bd.tar.bz2
mpv-01ef7e45790e1f0dd2277f73c583c9a503b2b6bd.tar.xz
Extend calc_src_dst_rects to also calculate the border values needed for
correctly placed dvdnav highlights, and fix direct3d and vdpau accordingly. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28633 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/vo_vdpau.c')
-rw-r--r--libvo/vo_vdpau.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/libvo/vo_vdpau.c b/libvo/vo_vdpau.c
index 46e897615c..368f889c6b 100644
--- a/libvo/vo_vdpau.c
+++ b/libvo/vo_vdpau.c
@@ -138,6 +138,7 @@ static int decoder_max_refs;
static VdpRect src_rect_vid;
static VdpRect out_rect_vid;
+static int border_x, border_y;
static struct vdpau_render_state surface_render[MAX_VIDEO_SURFACES];
static int surface_num;
@@ -184,7 +185,8 @@ static void resize(void)
int i;
struct vo_rect src_rect;
struct vo_rect dst_rect;
- calc_src_dst_rects(vid_width, vid_height, &src_rect, &dst_rect, NULL);
+ struct vo_rect borders;
+ calc_src_dst_rects(vid_width, vid_height, &src_rect, &dst_rect, &borders, NULL);
out_rect_vid.x0 = dst_rect.left;
out_rect_vid.x1 = dst_rect.right;
out_rect_vid.y0 = dst_rect.top;
@@ -193,6 +195,8 @@ static void resize(void)
src_rect_vid.x1 = src_rect.right;
src_rect_vid.y0 = src_rect.top;
src_rect_vid.y1 = src_rect.bottom;
+ border_x = borders.left;
+ border_y = borders.top;
#ifdef CONFIG_FREETYPE
// adjust font size to display size
force_load_font = 1;
@@ -522,7 +526,8 @@ static void draw_osd(void)
{
mp_msg(MSGT_VO, MSGL_DBG2, "DRAW_OSD\n");
- vo_draw_text(vo_dwidth, vo_dheight, draw_osd_I8A8);
+ vo_draw_text_ext(vo_dwidth, vo_dheight, border_x, border_y, border_x, border_y,
+ vid_width, vid_height, draw_osd_I8A8);
}
static void flip_page(void)