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.
This commit is contained in:
Avi Halachmi (:avih) 2021-08-18 16:20:34 +03:00 committed by avih
parent 6193f723b0
commit c7cdd38ac9
1 changed files with 8 additions and 0 deletions

View File

@ -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);