| Index: webrtc/base/ratetracker.cc
|
| diff --git a/webrtc/base/ratetracker.cc b/webrtc/base/ratetracker.cc
|
| index 5cb449016e8e8d26ccf2f24015d4ed7288a58183..35521a8d3d47bd9aec2c9a8708a8dfefd56dfbb5 100644
|
| --- a/webrtc/base/ratetracker.cc
|
| +++ b/webrtc/base/ratetracker.cc
|
| @@ -73,8 +73,9 @@ double RateTracker::ComputeRateForInterval(
|
| size_t start_bucket = NextBucketIndex(current_bucket_ + buckets_to_skip);
|
| // Only count a portion of the first bucket according to how much of the
|
| // first bucket is within the current interval.
|
| - size_t total_samples = sample_buckets_[start_bucket] *
|
| - (bucket_milliseconds_ - milliseconds_to_skip) /
|
| + size_t total_samples = ((sample_buckets_[start_bucket] *
|
| + (bucket_milliseconds_ - milliseconds_to_skip)) +
|
| + (bucket_milliseconds_ >> 1)) /
|
| bucket_milliseconds_;
|
| // All other buckets in the interval are counted in their entirety.
|
| for (size_t i = NextBucketIndex(start_bucket);
|
|
|