summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sub/ass_mp.c3
-rw-r--r--sub/ass_mp.h3
-rw-r--r--sub/osd_libass.c7
3 files changed, 11 insertions, 2 deletions
diff --git a/sub/ass_mp.c b/sub/ass_mp.c
index c46daf415e..ac36e2d954 100644
--- a/sub/ass_mp.c
+++ b/sub/ass_mp.c
@@ -39,7 +39,8 @@
// res_y should be track->PlayResY
// It determines scaling of font sizes and more.
-void mp_ass_set_style(ASS_Style *style, int res_y, struct osd_style_opts *opts)
+void mp_ass_set_style(ASS_Style *style, int res_y,
+ const struct osd_style_opts *opts)
{
if (opts->font) {
free(style->FontName);
diff --git a/sub/ass_mp.h b/sub/ass_mp.h
index c0fba934eb..52c793c9b7 100644
--- a/sub/ass_mp.h
+++ b/sub/ass_mp.h
@@ -44,7 +44,8 @@ struct MPOpts;
struct mp_osd_res;
struct osd_style_opts;
-void mp_ass_set_style(ASS_Style *style, int res_y, struct osd_style_opts *opts);
+void mp_ass_set_style(ASS_Style *style, int res_y,
+ const struct osd_style_opts *opts);
void mp_ass_add_default_styles(ASS_Track *track, struct MPOpts *opts);
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;