From ff10bd65d68883d51cad9db5066f5e0baf74be30 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 24 Feb 2015 14:40:06 +0100 Subject: [PATCH] osd: force alignment for OSD bar Overwrite the alignment applied by the OSD style. Additionally, remove the initialization of the Alignment field in create_ass_track(); the value is always overwritten by mp_ass_set_style() later. Fixes #1626. (cherry picked from commit 53641a689d17d6fce31d752fbca150ca95796e81) --- sub/osd_libass.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sub/osd_libass.c b/sub/osd_libass.c index 6e61355a65..388c5a5b95 100644 --- a/sub/osd_libass.c +++ b/sub/osd_libass.c @@ -111,7 +111,6 @@ static void create_ass_track(struct osd_state *osd, struct osd_object *obj, int sid = ass_alloc_style(track); track->default_style = sid; ASS_Style *style = track->styles + sid; - style->Alignment = 5; // top-title, left style->Name = strdup("OSD"); // Set to neutral base direction, as opposed to VSFilter LTR default style->Encoding = -1; @@ -317,6 +316,8 @@ static void get_osd_bar_box(struct osd_state *osd, struct osd_object *obj, // Rendering with shadow is broken (because there's more than one shape) style->Shadow = 0; + style->Alignment = 5; + *o_border = style->Outline; *o_x = get_align(opts->osd_bar_align_x, track->PlayResX, *o_w, *o_border);