From c56520f232da0aeb86b27e03052cc1c48ab19ce0 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 1 Jun 2014 23:53:24 +0200 Subject: [PATCH] osd/libass: use BorderStyle=4 for background Avoids (some) overlaps. Hopefully fixes #822. --- sub/ass_mp.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sub/ass_mp.c b/sub/ass_mp.c index e3b3d39853..9ff8b03ede 100644 --- a/sub/ass_mp.c +++ b/sub/ass_mp.c @@ -57,6 +57,16 @@ void mp_ass_set_style(ASS_Style *style, double res_y, style->FontSize = opts->font_size * scale; style->PrimaryColour = MP_ASS_COLOR(opts->color); style->SecondaryColour = style->PrimaryColour; +#if LIBASS_VERSION >= 0x01102001 + style->OutlineColour = MP_ASS_COLOR(opts->border_color); + if (opts->back_color.a) { + style->BackColour = MP_ASS_COLOR(opts->back_color); + style->BorderStyle = 4; // opaque box + } else { + style->BackColour = MP_ASS_COLOR(opts->shadow_color); + style->BorderStyle = 1; // outline + } +#else if (opts->back_color.a) { style->OutlineColour = MP_ASS_COLOR(opts->back_color); style->BorderStyle = 3; // opaque box @@ -65,6 +75,7 @@ void mp_ass_set_style(ASS_Style *style, double res_y, style->BorderStyle = 1; // outline } style->BackColour = MP_ASS_COLOR(opts->shadow_color); +#endif style->Outline = opts->border_size * scale; style->Shadow = opts->shadow_offset * scale; style->Spacing = opts->spacing * scale;