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

Unified Diff: webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng.cc

Issue 1317243005: Turn webrtc::Vad into a pure virtual interface (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@ifc-merge-2
Patch Set: 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
Index: webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng.cc
diff --git a/webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng.cc b/webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng.cc
index 171198b9a39eeee9beb2030d96dadabfd6e4b037..1ef22f65fafa253e5868b54c05999a09ca7a2928 100644
--- a/webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng.cc
+++ b/webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng.cc
@@ -54,7 +54,8 @@ AudioEncoderCng::AudioEncoderCng(const Config& config)
num_cng_coefficients_(config.num_cng_coefficients),
sid_frame_interval_ms_(config.sid_frame_interval_ms),
last_frame_active_(true),
- vad_(config.vad ? config.vad : new Vad(config.vad_mode)) {
+ vad_(config.vad ? rtc_make_scoped_ptr(config.vad)
+ : CreateVad(config.vad_mode)) {
CHECK(config.IsOk()) << "Invalid configuration.";
cng_inst_ = CreateCngInst(SampleRateHz(), sid_frame_interval_ms_,
num_cng_coefficients_);
« no previous file with comments | « webrtc/common_audio/vad/vad.cc ('k') | webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698