Index: webrtc/modules/audio_coding/neteq/delay_manager.cc |
diff --git a/webrtc/modules/audio_coding/neteq/delay_manager.cc b/webrtc/modules/audio_coding/neteq/delay_manager.cc |
index a935561eff459bd386f414fc3a54105381718ea7..e7f76f616e9fc04c713467b944b1cf3f244c176c 100644 |
--- a/webrtc/modules/audio_coding/neteq/delay_manager.cc |
+++ b/webrtc/modules/audio_coding/neteq/delay_manager.cc |
@@ -22,7 +22,7 @@ |
namespace webrtc { |
-DelayManager::DelayManager(int max_packets_in_buffer, |
+DelayManager::DelayManager(size_t max_packets_in_buffer, |
DelayPeakDetector* peak_detector) |
: first_packet_received_(false), |
max_packets_in_buffer_(max_packets_in_buffer), |
@@ -239,7 +239,8 @@ void DelayManager::LimitTargetLevel() { |
} |
// Shift to Q8, then 75%.; |
- int max_buffer_packets_q8 = (3 * (max_packets_in_buffer_ << 8)) / 4; |
+ int max_buffer_packets_q8 = |
+ static_cast<int>((3 * (max_packets_in_buffer_ << 8)) / 4); |
target_level_ = std::min(target_level_, max_buffer_packets_q8); |
// Sanity check, at least 1 packet (in Q8). |
@@ -389,7 +390,8 @@ bool DelayManager::SetMinimumDelay(int delay_ms) { |
// |max_packets_in_buffer_|. |
if ((maximum_delay_ms_ > 0 && delay_ms > maximum_delay_ms_) || |
(packet_len_ms_ > 0 && |
- delay_ms > 3 * max_packets_in_buffer_ * packet_len_ms_ / 4)) { |
+ delay_ms > |
+ static_cast<int>(3 * max_packets_in_buffer_ * packet_len_ms_ / 4))) { |
return false; |
} |
minimum_delay_ms_ = delay_ms; |