From 447f73caf420880fe4e27d996781df50e52f80bd Mon Sep 17 00:00:00 2001 From: gnattu Date: Wed, 22 May 2024 13:41:54 +0800 Subject: [PATCH] Fix bitrate calculation accuracy Signed-off-by: gnattu --- Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs b/Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs index fc43401a56..f68c4ee09b 100644 --- a/Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs +++ b/Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs @@ -273,7 +273,7 @@ public class TrickplayManager : ITrickplayManager } // Update bitrate - var bitrate = (int)Math.Ceiling((decimal)new FileInfo(tilePath).Length * 8 / trickplayInfo.TileWidth / trickplayInfo.TileHeight / (trickplayInfo.Interval / 1000)); + var bitrate = (int)Math.Ceiling((decimal)new FileInfo(tilePath).Length * 8 / trickplayInfo.TileWidth / trickplayInfo.TileHeight / ((decimal)trickplayInfo.Interval / 1000)); trickplayInfo.Bandwidth = Math.Max(trickplayInfo.Bandwidth, bitrate); }