Index: webrtc/modules/pacing/alr_detector.cc |
diff --git a/webrtc/modules/pacing/alr_detector.cc b/webrtc/modules/pacing/alr_detector.cc |
index 7d62b212511c56be3c0a779445fdeb1fa434bd8c..68732105c1db20c8380df4cc10032439212d2542 100644 |
--- a/webrtc/modules/pacing/alr_detector.cc |
+++ b/webrtc/modules/pacing/alr_detector.cc |
@@ -67,8 +67,9 @@ void AlrDetector::OnBytesSent(size_t bytes_sent, int64_t delta_time_ms) { |
void AlrDetector::SetEstimatedBitrate(int bitrate_bps) { |
RTC_DCHECK(bitrate_bps); |
- alr_budget_.set_target_rate_kbps(bitrate_bps * bandwidth_usage_percent_ / |
- (1000 * 100)); |
+ const auto target_rate_kbps = int64_t{bitrate_bps} * |
+ bandwidth_usage_percent_ / (1000 * 100); |
+ alr_budget_.set_target_rate_kbps(rtc::dchecked_cast<int>(target_rate_kbps)); |
} |
rtc::Optional<int64_t> AlrDetector::GetApplicationLimitedRegionStartTime() |