aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-10-12 09:18:54 +0200
committerChocobozzz <me@florianbigard.com>2021-10-12 09:18:54 +0200
commit9f430a53be016f8db2736d5d8111282660b50f4c (patch)
tree42be1b6a4b0c48f99a42f6462da2307f18d57bdc /shared
parent41085b1583ade5ea1bb1d69965a62b98cf012209 (diff)
downloadPeerTube-9f430a53be016f8db2736d5d8111282660b50f4c.tar.gz
PeerTube-9f430a53be016f8db2736d5d8111282660b50f4c.tar.zst
PeerTube-9f430a53be016f8db2736d5d8111282660b50f4c.zip
Fix bitrate tests
Diffstat (limited to 'shared')
-rw-r--r--shared/core-utils/videos/bitrate.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/shared/core-utils/videos/bitrate.ts b/shared/core-utils/videos/bitrate.ts
index 3d4e47906..a6712f8a4 100644
--- a/shared/core-utils/videos/bitrate.ts
+++ b/shared/core-utils/videos/bitrate.ts
@@ -78,7 +78,7 @@ function calculateBitrate (options: {
78 78
79 for (const toTestResolution of resolutionsOrder) { 79 for (const toTestResolution of resolutionsOrder) {
80 if (toTestResolution <= resolution) { 80 if (toTestResolution <= resolution) {
81 return resolution * resolution * ratio * fps * bitPerPixel[toTestResolution] 81 return Math.floor(resolution * resolution * ratio * fps * bitPerPixel[toTestResolution])
82 } 82 }
83 } 83 }
84 84