]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - shared/core-utils/videos/bitrate.ts
Fix bitrate tests
[github/Chocobozzz/PeerTube.git] / shared / core-utils / videos / bitrate.ts
index 3d4e479066618d454feae5e3a0cace5dbc35afe4..a6712f8a4a8abafb333fbe17ed9d6f694af5c8d9 100644 (file)
@@ -78,7 +78,7 @@ function calculateBitrate (options: {
 
   for (const toTestResolution of resolutionsOrder) {
     if (toTestResolution <= resolution) {
-      return resolution * resolution * ratio * fps * bitPerPixel[toTestResolution]
+      return Math.floor(resolution * resolution * ratio * fps * bitPerPixel[toTestResolution])
     }
   }