summaryrefslogtreecommitdiffstats
path: root/sub
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-02-16 20:50:05 +0100
committerwm4 <wm4@nowhere>2013-02-16 20:50:05 +0100
commitf897138c2d4647cf2a7bbd0c58dc08c1f400fd48 (patch)
tree9bb1f4f0f3d4ba5de1e5a2a1e2c39132dec8f8a7 /sub
parent57879a22004144bf9e20a97eea5ef3c1c1fbbfd9 (diff)
downloadmpv-f897138c2d4647cf2a7bbd0c58dc08c1f400fd48.tar.bz2
mpv-f897138c2d4647cf2a7bbd0c58dc08c1f400fd48.tar.xz
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.)
Diffstat (limited to 'sub')
-rw-r--r--sub/osd_libass.c6
1 files changed, 4 insertions, 2 deletions
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}");