add osd-scale command

Signed-off-by: Paul B Mahol <onemda@gmail.com>

Modified to add docs for --osd-scale option, and adjusted to the
previous commit by wm4.
This commit is contained in:
Paul B Mahol
2013-05-14 12:10:27 +00:00
committed by wm4
parent f562a41ca2
commit 83570fc0fb
7 changed files with 16 additions and 0 deletions

View File

@@ -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);