summaryrefslogtreecommitdiffstats
path: root/sub/osd_libass.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-06-03 22:14:56 +0200
committerwm4 <wm4@nowhere>2013-06-03 22:40:07 +0200
commit8c63b318dc106f43d9ab17250452216bab485587 (patch)
tree0c4480c7c355fd0bdb371657718f62e16b1c5fe2 /sub/osd_libass.c
parent9f4261de65c18d3a34e70c9f969966ca85c80a8d (diff)
downloadmpv-8c63b318dc106f43d9ab17250452216bab485587.tar.bz2
mpv-8c63b318dc106f43d9ab17250452216bab485587.tar.xz
ass_mp: provide function to add default styles
Diffstat (limited to 'sub/osd_libass.c')
-rw-r--r--sub/osd_libass.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sub/osd_libass.c b/sub/osd_libass.c
index 6733b9b6c2..cbf9466780 100644
--- a/sub/osd_libass.c
+++ b/sub/osd_libass.c
@@ -89,7 +89,7 @@ static void create_osd_ass_track(struct osd_state *osd, struct osd_object *obj)
ASS_Style *style = track->styles + sid;
style->Alignment = 5; // top-title, left
style->Name = strdup("OSD");
- mp_ass_set_style(style, osd->opts->osd_style);
+ 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;
}
@@ -158,7 +158,7 @@ static void update_osd(struct osd_state *osd, struct osd_object *obj)
font.font_size *= opts->osd_scale;
ASS_Style *style = obj->osd_track->styles + obj->osd_track->default_style;
- mp_ass_set_style(style, &font);
+ mp_ass_set_style(style, obj->osd_track->PlayResY, &font);
char *text = mangle_ass(osd->osd_text);
add_osd_ass_event(obj->osd_track, text);
@@ -364,7 +364,7 @@ static void update_sub(struct osd_state *osd, struct osd_object *obj)
font.font_size *= opts->sub_scale;
ASS_Style *style = obj->osd_track->styles + obj->osd_track->default_style;
- mp_ass_set_style(style, &font);
+ mp_ass_set_style(style, obj->osd_track->PlayResY, &font);
#if LIBASS_VERSION >= 0x01010000
ass_set_line_position(osd->osd_render, 100 - opts->sub_pos);