diff --git a/sub/osd_libass.c b/sub/osd_libass.c index 667431eb7b..917bf2649c 100644 --- a/sub/osd_libass.c +++ b/sub/osd_libass.c @@ -367,6 +367,14 @@ static void get_osd_bar_box(struct osd_state *osd, struct osd_object *obj, mp_ass_set_style(style, track->PlayResY, opts->osd_style); + if (osd->opts->osd_style->back_color.a) { + // override the default osd opaque-box into plain outline. Otherwise + // the opaque box is not aligned with the bar (even without shadow), + // and each bar ass event gets its own opaque box - breaking the bar. + style->BackColour = MP_ASS_COLOR(opts->osd_style->shadow_color); + style->BorderStyle = 1; // outline + } + *o_w = track->PlayResX * (opts->osd_bar_w / 100.0); *o_h = track->PlayResY * (opts->osd_bar_h / 100.0);