From 83570fc0fb7aee06411c037842ec941c1f920483 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Tue, 14 May 2013 12:10:27 +0000 Subject: add osd-scale command Signed-off-by: Paul B Mahol Modified to add docs for --osd-scale option, and adjusted to the previous commit by wm4. --- sub/osd_libass.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'sub/osd_libass.c') diff --git a/sub/osd_libass.c b/sub/osd_libass.c index 495bce2b73..d157f7925c 100644 --- a/sub/osd_libass.c +++ b/sub/osd_libass.c @@ -147,11 +147,19 @@ static char *mangle_ass(const char *in) static void update_osd(struct osd_state *osd, struct osd_object *obj) { + struct MPOpts *opts = osd->opts; + create_osd_ass_track(osd, obj); clear_obj(obj); if (!osd->osd_text[0]) return; + struct osd_style_opts font = *opts->osd_style; + font.font_size *= opts->osd_scale; + + ASS_Style *style = obj->osd_track->styles + obj->osd_track->default_style; + mp_ass_set_style(style, &font); + char *text = mangle_ass(osd->osd_text); add_osd_ass_event(obj->osd_track, text); talloc_free(text); -- cgit v1.2.3