Browse Source

Fix bitrate calculation accuracy

Signed-off-by: gnattu <gnattuoc@me.com>
gnattu 1 năm trước cách đây
mục cha
commit
447f73caf4

+ 1 - 1
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);
         }