From 03efc89151725efeee622fa86ff24c4affcf521d Mon Sep 17 00:00:00 2001 From: "pwestin@webrtc.org" Date: Thu, 2 May 2013 21:19:12 +0000 Subject: [PATCH] Fix when SetMinimumPlayoutDelay is configured to 0 BUG=1720 R=turaj@webrtc.org Review URL: https://webrtc-codereview.appspot.com/1386005 git-svn-id: http://webrtc.googlecode.com/svn/trunk@3942 4adac7df-926f-26a2-2b94-8c16560cd09d --- .../audio_coding/main/source/audio_coding_module_impl.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/webrtc/modules/audio_coding/main/source/audio_coding_module_impl.cc b/webrtc/modules/audio_coding/main/source/audio_coding_module_impl.cc index a0cde4911..be9befc4c 100644 --- a/webrtc/modules/audio_coding/main/source/audio_coding_module_impl.cc +++ b/webrtc/modules/audio_coding/main/source/audio_coding_module_impl.cc @@ -2932,7 +2932,9 @@ int AudioCodingModuleImpl::SetInitialPlayoutDelay(int delay_ms) { return -1; } initial_delay_ms_ = delay_ms; - track_neteq_buffer_ = true; + if (delay_ms > 0) { + track_neteq_buffer_ = true; + } av_sync_ = true; neteq_.EnableAVSync(av_sync_); return neteq_.SetExtraDelay(delay_ms); @@ -2946,6 +2948,7 @@ bool AudioCodingModuleImpl::GetSilence(int desired_sample_rate_hz, } if (accumulated_audio_ms_ >= initial_delay_ms_) { + // We have enough data stored that match our initial delay target. track_neteq_buffer_ = false; return false; }