summaryrefslogtreecommitdiffstats
path: root/libvo/vo_xv.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@symbol.nonexistent.invalid>2008-06-24 01:53:58 +0300
committerUoti Urpala <uau@symbol.nonexistent.invalid>2008-06-24 01:53:58 +0300
commita232f564d3f271277135276281c03cca7807ef16 (patch)
tree63c0ebd5b39094e2cc24da83a4e5ce889964b003 /libvo/vo_xv.c
parentde560e8167c21a8fd9ea34f5f42f377102d65232 (diff)
downloadmpv-a232f564d3f271277135276281c03cca7807ef16.tar.bz2
mpv-a232f564d3f271277135276281c03cca7807ef16.tar.xz
Create a context struct for OSD state
This commit creates the struct and passes it to some functions that needs to access OSD state but does not yet move much data from globals to it. vf_expand accesses the OSD state for rendering purposes outside of the normal OSD draw time. The way this currently works is suboptimal, but I did not attempt to clean it up now. To keep things working the same way vf_expand needs to know the address of the state object to be able to access the data even in the functions that should normally not need it. For that purpose this commit adds a VFCTRL to tell vf_expand the address of the object.
Diffstat (limited to 'libvo/vo_xv.c')
-rw-r--r--libvo/vo_xv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c
index dca050975e..d63b2f732d 100644
--- a/libvo/vo_xv.c
+++ b/libvo/vo_xv.c
@@ -510,11 +510,11 @@ static void check_events(struct vo *vo)
}
}
-static void draw_osd(struct vo *vo)
+static void draw_osd(struct vo *vo, struct osd_state *osd)
{
struct xvctx *ctx = vo->priv;
- osd_draw_text(ctx->image_width -
+ osd_draw_text(osd, ctx->image_width -
ctx->image_width * vo->panscan_x / (vo->dwidth + vo->panscan_x),
ctx->image_height, ctx->draw_alpha_fnc, vo);
}