diff options
author | wm4 <wm4@nowhere> | 2015-07-14 23:23:23 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-07-14 23:23:23 +0200 |
commit | 27708eee81eebe8b59f24aa5117efdcc8b4e2674 (patch) | |
tree | c338339ce9b65b4443f159c592594fdd94e9efb7 /player | |
parent | 739d345d6cf0ead2b25f03ca83123a081b506267 (diff) | |
download | mpv-27708eee81eebe8b59f24aa5117efdcc8b4e2674.tar.bz2 mpv-27708eee81eebe8b59f24aa5117efdcc8b4e2674.tar.xz |
player: show larger cache sizes in MB on status line
Diffstat (limited to 'player')
-rw-r--r-- | player/osd.c | 6 |
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)); + } } } |