summaryrefslogtreecommitdiffstats
path: root/sub/osd_libass.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-09-16 17:17:32 +0200
committerwm4 <wm4@nowhere>2016-09-16 17:17:32 +0200
commit56616b0b013cbeae69555ae95ff577482e82bb1f (patch)
tree300775be304743b2cbc24910189d7c038f4c2c10 /sub/osd_libass.c
parent17e3e800e1b7bb568ea150fd8182b63966bff509 (diff)
downloadmpv-56616b0b013cbeae69555ae95ff577482e82bb1f.tar.bz2
mpv-56616b0b013cbeae69555ae95ff577482e82bb1f.tar.xz
osd: fix OSD getting stuck with --blend-subtitles=yes
If --blend-subtitles=yes is given, vo_opengl will call osd_draw() multiple times, once for subtitles, and once for OSD. This meant that the want_redraw flag was reset before the OSD was rendered, which in turn meant that update_osd() was never called. It seems like removing the per-OSD object want_redraw wasn't such a good idea. Fix it by reintroducing such a flag for OSDTYPE_OSD only. Also, the want_redraw flag is now unused, so kill it. Another regression caused by commit 9c9cf125. Fixes #3535.
Diffstat (limited to 'sub/osd_libass.c')
-rw-r--r--sub/osd_libass.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sub/osd_libass.c b/sub/osd_libass.c
index 9b634f5214..49edafbcf5 100644
--- a/sub/osd_libass.c
+++ b/sub/osd_libass.c
@@ -431,6 +431,7 @@ static void update_progbar(struct osd_state *osd, struct osd_object *obj)
static void update_osd(struct osd_state *osd, struct osd_object *obj)
{
+ obj->osd_changed = false;
clear_ass(&obj->ass);
update_osd_text(osd, obj);
update_progbar(osd, obj);
@@ -501,7 +502,7 @@ void osd_set_external(struct osd_state *osd, void *id, int res_x, int res_y,
entry->res_y = res_y;
update_external(osd, obj, entry);
obj->changed = true;
- osd_changed_unlocked(osd);
+ osd->want_redraw_notification = true;
}
done:
@@ -527,7 +528,7 @@ static void append_ass(struct ass_state *ass, struct mp_osd_res *res,
void osd_object_get_bitmaps(struct osd_state *osd, struct osd_object *obj,
int format, struct sub_bitmaps *out_imgs)
{
- if (osd->want_redraw && obj->type == OSDTYPE_OSD)
+ if (obj->type == OSDTYPE_OSD && obj->osd_changed)
update_osd(osd, obj);
if (!obj->ass_packer)