From 48d96c0bcc5decdb8c83a5d7c004b8f8fefe6d87 Mon Sep 17 00:00:00 2001 From: Gustaf Ullberg Date: Fri, 15 Sep 2017 13:59:52 +0200 Subject: [PATCH] Corrected upper limits of NetEq minimum and maximum delay. Set limits of NetEq minimum and maximum delay to 0-10000 ms closed interval. Fixed error message in Audio Coding Module. Bug: webrtc:6861 Change-Id: Id1b9928f808bdb6e1088c6895f2ec4a53b00efb2 Reviewed-on: https://webrtc-review.googlesource.com/1343 Commit-Queue: Gustaf Ullberg Reviewed-by: Henrik Lundin Cr-Commit-Position: refs/heads/master@{#19860} --- modules/audio_coding/acm2/audio_coding_module.cc | 4 ++-- modules/audio_coding/neteq/neteq_impl.cc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/audio_coding/acm2/audio_coding_module.cc b/modules/audio_coding/acm2/audio_coding_module.cc index 1f108f5ed9..5997d1269e 100644 --- a/modules/audio_coding/acm2/audio_coding_module.cc +++ b/modules/audio_coding/acm2/audio_coding_module.cc @@ -1096,7 +1096,7 @@ int AudioCodingModuleImpl::IncomingPacket(const uint8_t* incoming_payload, // Minimum playout delay (Used for lip-sync). int AudioCodingModuleImpl::SetMinimumPlayoutDelay(int time_ms) { if ((time_ms < 0) || (time_ms > 10000)) { - LOG(LS_ERROR) << "Delay must be in the range of 0-1000 milliseconds."; + LOG(LS_ERROR) << "Delay must be in the range of 0-10000 milliseconds."; return -1; } return receiver_.SetMinimumDelay(time_ms); @@ -1104,7 +1104,7 @@ int AudioCodingModuleImpl::SetMinimumPlayoutDelay(int time_ms) { int AudioCodingModuleImpl::SetMaximumPlayoutDelay(int time_ms) { if ((time_ms < 0) || (time_ms > 10000)) { - LOG(LS_ERROR) << "Delay must be in the range of 0-1000 milliseconds."; + LOG(LS_ERROR) << "Delay must be in the range of 0-10000 milliseconds."; return -1; } return receiver_.SetMaximumDelay(time_ms); diff --git a/modules/audio_coding/neteq/neteq_impl.cc b/modules/audio_coding/neteq/neteq_impl.cc index 680250f20f..3cdcf458af 100644 --- a/modules/audio_coding/neteq/neteq_impl.cc +++ b/modules/audio_coding/neteq/neteq_impl.cc @@ -282,7 +282,7 @@ void NetEqImpl::RemoveAllPayloadTypes() { bool NetEqImpl::SetMinimumDelay(int delay_ms) { rtc::CritScope lock(&crit_sect_); - if (delay_ms >= 0 && delay_ms < 10000) { + if (delay_ms >= 0 && delay_ms <= 10000) { assert(delay_manager_.get()); return delay_manager_->SetMinimumDelay(delay_ms); } @@ -291,7 +291,7 @@ bool NetEqImpl::SetMinimumDelay(int delay_ms) { bool NetEqImpl::SetMaximumDelay(int delay_ms) { rtc::CritScope lock(&crit_sect_); - if (delay_ms >= 0 && delay_ms < 10000) { + if (delay_ms >= 0 && delay_ms <= 10000) { assert(delay_manager_.get()); return delay_manager_->SetMaximumDelay(delay_ms); }