Skip to content

Commit

Permalink
Explicitly use decimal
Browse files Browse the repository at this point in the history
Co-authored-by: Cody Robibero <cody@robibe.ro>
  • Loading branch information
gnattu and crobibero committed May 22, 2024
1 parent 447f73c commit fa2bff3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ public TrickplayInfo CreateTiles(List<string> images, int width, TrickplayOption
}

// Update bitrate
var bitrate = (int)Math.Ceiling((decimal)new FileInfo(tilePath).Length * 8 / trickplayInfo.TileWidth / trickplayInfo.TileHeight / ((decimal)trickplayInfo.Interval / 1000));
var bitrate = (int)Math.Ceiling(new FileInfo(tilePath).Length * 8m / trickplayInfo.TileWidth / trickplayInfo.TileHeight / (trickplayInfo.Interval / 1000m));
trickplayInfo.Bandwidth = Math.Max(trickplayInfo.Bandwidth, bitrate);
}

Expand Down

0 comments on commit fa2bff3

Please sign in to comment.