summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
Diffstat (limited to 'player')
-rw-r--r--player/command.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/player/command.c b/player/command.c
index 35738e1efb..6f1a769a20 100644
--- a/player/command.c
+++ b/player/command.c
@@ -105,7 +105,10 @@ static void mark_seek(struct MPContext *mpctx)
static char *format_bitrate(int rate)
{
- return talloc_asprintf(NULL, "%d kbps", rate / 1000);
+ if (rate < 1024 * 1024)
+ return talloc_asprintf(NULL, "%.3f kbps", rate * 8.0 / 1000.0);
+
+ return talloc_asprintf(NULL, "%.3f mbps", rate * 8.0 / 1000000.0);
}
static char *format_file_size(int64_t size)