From f897138c2d4647cf2a7bbd0c58dc08c1f400fd48 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 16 Feb 2013 20:50:05 +0100 Subject: osd: always update already visible OSD bar on seeks Seeks can be performed with OSD bar invisible (e.g. "osd-msg seek ..." command), and then an already visible bar won't be updated. But the bar will stick around until the OSD text is hidden. This is confusing, so change it that the bar is updated. (Making the bar disappear on such seeks would require much more changes, so we're lazy and go with this commit.) --- sub/osd_libass.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sub') diff --git a/sub/osd_libass.c b/sub/osd_libass.c index 4b695e62a2..051383f78e 100644 --- a/sub/osd_libass.c +++ b/sub/osd_libass.c @@ -204,9 +204,11 @@ static void update_progbar(struct osd_state *osd, struct osd_object *obj) char *text = talloc_strdup(NULL, "{\\q2}"); - if (osd->progbar_type >= 32) { + if (osd->progbar_type == 0 || osd->progbar_type >= 256) { + // no sym + } else if (osd->progbar_type >= 32) { text = append_utf8_buffer(text, osd->progbar_type); - } else if (osd->progbar_type > 0) { + } else { text = talloc_strdup_append_buffer(text, ASS_USE_OSD_FONT); text = append_utf8_buffer(text, OSD_CODEPOINTS + osd->progbar_type); text = talloc_strdup_append_buffer(text, "{\\r}"); -- cgit v1.2.3