diff options
author | wm4 <wm4@nowhere> | 2013-09-26 17:49:54 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-09-26 17:49:54 +0200 |
commit | 696a8c5609ca1bf260176cb9c43f483463a72c97 (patch) | |
tree | 5c344a01b5ff62ea7833806469db7e3b1f12f194 /sub/osd_libass.c | |
parent | 5a837ced0ba37b4399ecdf9500637a628b599f0d (diff) | |
download | mpv-696a8c5609ca1bf260176cb9c43f483463a72c97.tar.bz2 mpv-696a8c5609ca1bf260176cb9c43f483463a72c97.tar.xz |
osd_libass: add "Default" dummy style
This is pretty much a hack for the OSC. It will allow it to rely on a
somewhat predictable style, instead of having to overwrite all user
OSD settings manually with override tags.
Diffstat (limited to 'sub/osd_libass.c')
-rw-r--r-- | sub/osd_libass.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sub/osd_libass.c b/sub/osd_libass.c index 45edbc7cc8..29db58f464 100644 --- a/sub/osd_libass.c +++ b/sub/osd_libass.c @@ -90,6 +90,13 @@ static void create_osd_ass_track(struct osd_state *osd, struct osd_object *obj) mp_ass_set_style(style, MP_ASS_FONT_PLAYRESY, osd->opts->osd_style); // Set to neutral base direction, as opposed to VSFilter LTR default style->Encoding = -1; + + sid = ass_alloc_style(track); + style = track->styles + sid; + style->Name = strdup("Default"); + const struct osd_style_opts *def = osd_style_conf.defaults; + mp_ass_set_style(style, MP_ASS_FONT_PLAYRESY, def); + style->Encoding = -1; } obj->osd_track = track; |