From 27708eee81eebe8b59f24aa5117efdcc8b4e2674 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 14 Jul 2015 23:23:23 +0200 Subject: player: show larger cache sizes in MB on status line --- player/osd.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'player') 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)); + } } } -- cgit v1.2.3