Index: webrtc/test/fake_audio_device.cc |
diff --git a/webrtc/test/fake_audio_device.cc b/webrtc/test/fake_audio_device.cc |
index bf89860f0bc454b6e7d2c50cc46b00cc9560a406..bea125b14c085b8694b52d215c384f87169e74aa 100644 |
--- a/webrtc/test/fake_audio_device.cc |
+++ b/webrtc/test/fake_audio_device.cc |
@@ -115,9 +115,10 @@ void FakeAudioDevice::CaptureAudio() { |
uint32_t samples_needed = kFrequencyHz / 100; |
int64_t now_ms = clock_->TimeInMilliseconds(); |
uint32_t time_since_last_playout_ms = now_ms - last_playout_ms_; |
- if (last_playout_ms_ > 0 && time_since_last_playout_ms > 0) |
+ if (last_playout_ms_ > 0 && time_since_last_playout_ms > 0) { |
samples_needed = std::min(kFrequencyHz / time_since_last_playout_ms, |
kBufferSizeBytes / 2); |
+ } |
uint32_t samples_out = 0; |
int64_t elapsed_time_ms = -1; |
int64_t ntp_time_ms = -1; |