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

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

Issue 1349393003: Don't link with audio codecs that we don't use (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@dmove-clean
Patch Set: More ARM fixes Created 5 years, 3 months 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/BUILD.gn ('k') | webrtc/modules/audio_coding/main/audio_coding_module.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_coding/main/acm2/codec_owner.cc
diff --git a/webrtc/modules/audio_coding/main/acm2/codec_owner.cc b/webrtc/modules/audio_coding/main/acm2/codec_owner.cc
index 669eadb68e87452810411fee1a3ddeb16344b5c2..66be85ff8e333f74668f0a9c7946bd386f282884 100644
--- a/webrtc/modules/audio_coding/main/acm2/codec_owner.cc
+++ b/webrtc/modules/audio_coding/main/acm2/codec_owner.cc
@@ -131,15 +131,18 @@ rtc::scoped_ptr<AudioEncoder> CreateSpeechEncoder(
AudioEncoder* CreateRedEncoder(int red_payload_type,
AudioEncoder* encoder,
rtc::scoped_ptr<AudioEncoder>* red_encoder) {
- if (red_payload_type == -1) {
- red_encoder->reset();
- return encoder;
+#ifdef WEBRTC_CODEC_RED
+ if (red_payload_type != -1) {
+ AudioEncoderCopyRed::Config config;
+ config.payload_type = red_payload_type;
+ config.speech_encoder = encoder;
+ red_encoder->reset(new AudioEncoderCopyRed(config));
+ return red_encoder->get();
}
- AudioEncoderCopyRed::Config config;
- config.payload_type = red_payload_type;
- config.speech_encoder = encoder;
- red_encoder->reset(new AudioEncoderCopyRed(config));
- return red_encoder->get();
+#endif
+
+ red_encoder->reset();
+ return encoder;
}
void CreateCngEncoder(int cng_payload_type,
« no previous file with comments | « webrtc/modules/audio_coding/BUILD.gn ('k') | webrtc/modules/audio_coding/main/audio_coding_module.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698