Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(415)

Unified Diff: webrtc/modules/audio_coding/main/acm2/rent_a_codec.cc

Issue 1473563004: Move the stereo-disables-CNG logic from CodecManager to Rent-A-Codec (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/modules/audio_coding/main/acm2/codec_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_coding/main/acm2/rent_a_codec.cc
diff --git a/webrtc/modules/audio_coding/main/acm2/rent_a_codec.cc b/webrtc/modules/audio_coding/main/acm2/rent_a_codec.cc
index 328181428bb6bc4eb7af21188222615915b20344..b31092cb1129427ac05a495b4966797a081dc733 100644
--- a/webrtc/modules/audio_coding/main/acm2/rent_a_codec.cc
+++ b/webrtc/modules/audio_coding/main/acm2/rent_a_codec.cc
@@ -259,7 +259,8 @@ AudioEncoder* RentACodec::RentEncoderStack(AudioEncoder* speech_encoder,
: rtc::Optional<int>(it->second);
};
auto cng_pt = pt(param->cng_payload_types);
- param->use_cng = param->use_cng && cng_pt;
+ param->use_cng =
+ param->use_cng && cng_pt && speech_encoder->NumChannels() == 1;
auto red_pt = pt(param->red_payload_types);
param->use_red = param->use_red && red_pt;
« no previous file with comments | « webrtc/modules/audio_coding/main/acm2/codec_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698