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
This commit is contained in:
parent
42636e82d0
commit
03efc89151
@ -2932,7 +2932,9 @@ int AudioCodingModuleImpl::SetInitialPlayoutDelay(int delay_ms) {
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
initial_delay_ms_ = delay_ms;
|
initial_delay_ms_ = delay_ms;
|
||||||
|
if (delay_ms > 0) {
|
||||||
track_neteq_buffer_ = true;
|
track_neteq_buffer_ = true;
|
||||||
|
}
|
||||||
av_sync_ = true;
|
av_sync_ = true;
|
||||||
neteq_.EnableAVSync(av_sync_);
|
neteq_.EnableAVSync(av_sync_);
|
||||||
return neteq_.SetExtraDelay(delay_ms);
|
return neteq_.SetExtraDelay(delay_ms);
|
||||||
@ -2946,6 +2948,7 @@ bool AudioCodingModuleImpl::GetSilence(int desired_sample_rate_hz,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (accumulated_audio_ms_ >= initial_delay_ms_) {
|
if (accumulated_audio_ms_ >= initial_delay_ms_) {
|
||||||
|
// We have enough data stored that match our initial delay target.
|
||||||
track_neteq_buffer_ = false;
|
track_neteq_buffer_ = false;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user