summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorMarcoen Hirschberg <marcoen@gmail.com>2014-06-02 14:19:56 +0200
committerwm4 <wm4@nowhere>2014-06-02 22:20:25 +0200
commitaf25e0aba8afa8e176b355a5795e11b13f0b9349 (patch)
tree0253ca1c0c53d15e5c84fe57fb9c1b45a46fab44 /player
parentd838bd64202464e392e330ed3240307c34f2c4bf (diff)
downloadmpv-af25e0aba8afa8e176b355a5795e11b13f0b9349.tar.bz2
mpv-af25e0aba8afa8e176b355a5795e11b13f0b9349.tar.xz
command: format_bitrate: fix conversion to kbits and mbits
Bitrates are now expressed in bits/second. This commit fixes conversions which assumed it was still in bytes/second. Signed-off-by: wm4 <wm4@nowhere>
Diffstat (limited to 'player')
-rw-r--r--player/command.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/player/command.c b/player/command.c
index 6f1a769a20..e9f71ebf41 100644
--- a/player/command.c
+++ b/player/command.c
@@ -106,9 +106,9 @@ static void mark_seek(struct MPContext *mpctx)
static char *format_bitrate(int rate)
{
if (rate < 1024 * 1024)
- return talloc_asprintf(NULL, "%.3f kbps", rate * 8.0 / 1000.0);
+ return talloc_asprintf(NULL, "%.3f kbps", rate / 1000.0);
- return talloc_asprintf(NULL, "%.3f mbps", rate * 8.0 / 1000000.0);
+ return talloc_asprintf(NULL, "%.3f mbps", rate / 1000000.0);
}
static char *format_file_size(int64_t size)