From c7cdd38ac99882d3e41a26f275c920886df3569b Mon Sep 17 00:00:00 2001 From: "Avi Halachmi (:avih)" Date: Wed, 18 Aug 2021 16:20:34 +0300 Subject: osd_libass: disable --osd-back-color for the progress bar This breaks the rendering in various ways, so first workaround is to simply disable the opaque box for the bar. Next commit will add an artificial background box. --- sub/osd_libass.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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); -- cgit v1.2.3