Fixing a bug in expand_rate calculation for stereo signal.

BUG=
R=henrik.lundin@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/41849004

Cr-Commit-Position: refs/heads/master@{#8307}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8307 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/webrtc/modules/audio_coding/neteq/neteq_impl.cc b/webrtc/modules/audio_coding/neteq/neteq_impl.cc
index a2f7a41..7ce4238 100644
--- a/webrtc/modules/audio_coding/neteq/neteq_impl.cc
+++ b/webrtc/modules/audio_coding/neteq/neteq_impl.cc
@@ -1349,14 +1349,16 @@
   int new_length = merge_->Process(decoded_buffer, decoded_length,
                                    mute_factor_array_.get(),
                                    algorithm_buffer_.get());
+  int expand_length_correction = new_length -
+      static_cast<int>(decoded_length / algorithm_buffer_->Channels());
 
   // Update in-call and post-call statistics.
   if (expand_->MuteFactor(0) == 0) {
     // Expand generates only noise.
-    stats_.ExpandedNoiseSamples(new_length - static_cast<int>(decoded_length));
+    stats_.ExpandedNoiseSamples(expand_length_correction);
   } else {
     // Expansion generates more than only noise.
-    stats_.ExpandedVoiceSamples(new_length - static_cast<int>(decoded_length));
+    stats_.ExpandedVoiceSamples(expand_length_correction);
   }
 
   last_mode_ = kModeMerge;