diff options
author | wm4 <wm4@nowhere> | 2014-06-01 23:53:24 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-06-01 23:53:24 +0200 |
commit | c56520f232da0aeb86b27e03052cc1c48ab19ce0 (patch) | |
tree | fcbd250bc89755c02657db05cefac16bb1ee806d | |
parent | f2a00f3de366d4c1da13b82c03753ba14dfee6b4 (diff) | |
download | mpv-c56520f232da0aeb86b27e03052cc1c48ab19ce0.tar.bz2 mpv-c56520f232da0aeb86b27e03052cc1c48ab19ce0.tar.xz |
osd/libass: use BorderStyle=4 for background
Avoids (some) overlaps. Hopefully fixes #822.
-rw-r--r-- | sub/ass_mp.c | 11 |
1 files changed, 11 insertions, 0 deletions
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; |