summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-07-14 23:23:23 +0200
committerwm4 <wm4@nowhere>2015-07-14 23:23:23 +0200
commit27708eee81eebe8b59f24aa5117efdcc8b4e2674 (patch)
treec338339ce9b65b4443f159c592594fdd94e9efb7
parent739d345d6cf0ead2b25f03ca83123a081b506267 (diff)
downloadmpv-27708eee81eebe8b59f24aa5117efdcc8b4e2674.tar.bz2
mpv-27708eee81eebe8b59f24aa5117efdcc8b4e2674.tar.xz
player: show larger cache sizes in MB on status line
-rw-r--r--player/osd.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/player/osd.c b/player/osd.c
index c775197276..0bdb368f7e 100644
--- a/player/osd.c
+++ b/player/osd.c
@@ -248,7 +248,11 @@ static void print_status(struct MPContext *mpctx)
} else {
saddf(&line, "%2ds", (int)s.ts_duration);
}
- saddf(&line, "+%lldKB", (long long)(fill / 1024));
+ if (fill >= 1024 * 1024) {
+ saddf(&line, "+%lldMB", (long long)(fill / 1024 / 1024));
+ } else {
+ saddf(&line, "+%lldKB", (long long)(fill / 1024));
+ }
}
}