From 60f6ce2a29cf72d9a1ec7bdf0fa947a2b25cba07 Mon Sep 17 00:00:00 2001 From: "henrik.lundin" Date: Tue, 10 May 2016 03:52:04 -0700 Subject: [PATCH] NetEq: Update stats earlier in the GetAudioInternal call This is to prepare for implementation of NetEq muted state, which may cause GetAudioInternal to make an early return just before the call to GetDecision. With this change, the stats are updated in any case. BUG=webrtc:5608 NOTRY=True Review-Url: https://codereview.webrtc.org/1948663002 Cr-Commit-Position: refs/heads/master@{#12671} --- webrtc/modules/audio_coding/neteq/neteq_impl.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/webrtc/modules/audio_coding/neteq/neteq_impl.cc b/webrtc/modules/audio_coding/neteq/neteq_impl.cc index 555d3c71bc..945ac5ce16 100644 --- a/webrtc/modules/audio_coding/neteq/neteq_impl.cc +++ b/webrtc/modules/audio_coding/neteq/neteq_impl.cc @@ -815,6 +815,7 @@ int NetEqImpl::GetAudioInternal(AudioFrame* audio_frame) { Operations operation; bool play_dtmf; tick_timer_->Increment(); + stats_.IncreaseCounter(output_size_samples_, fs_hz_); int return_value = GetDecision(&operation, &packet_list, &dtmf_event, &play_dtmf); if (return_value != 0) { @@ -1029,9 +1030,6 @@ int NetEqImpl::GetDecision(Operations* operation, *play_dtmf = false; *operation = kUndefined; - // Increment time counters. - stats_.IncreaseCounter(output_size_samples_, fs_hz_); - assert(sync_buffer_.get()); uint32_t end_timestamp = sync_buffer_->end_timestamp(); if (!new_codec_) {