From 51bb33cc182a73847f2ba696de4cf6e987dc7e7b Mon Sep 17 00:00:00 2001 From: "kwiberg@webrtc.org" Date: Thu, 4 Sep 2014 08:42:44 +0000 Subject: [PATCH] ACMOpus: Remove useless member variable fec_enabled_ R=henrik.lundin@webrtc.org, minyue@webrtc.org Review URL: https://webrtc-codereview.appspot.com/18319004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@7057 4adac7df-926f-26a2-2b94-8c16560cd09d --- webrtc/modules/audio_coding/main/acm2/acm_opus.cc | 10 ++-------- webrtc/modules/audio_coding/main/acm2/acm_opus.h | 1 - 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/webrtc/modules/audio_coding/main/acm2/acm_opus.cc b/webrtc/modules/audio_coding/main/acm2/acm_opus.cc index 2a3a573cef..3d4f347097 100644 --- a/webrtc/modules/audio_coding/main/acm2/acm_opus.cc +++ b/webrtc/modules/audio_coding/main/acm2/acm_opus.cc @@ -28,7 +28,6 @@ ACMOpus::ACMOpus(int16_t /* codec_id */) sample_freq_(0), bitrate_(0), channels_(1), - fec_enabled_(false), packet_loss_rate_(0) { return; } @@ -73,7 +72,6 @@ ACMOpus::ACMOpus(int16_t codec_id) sample_freq_(32000), // Default sampling frequency. bitrate_(20000), // Default bit-rate. channels_(1), // Default mono. - fec_enabled_(false), // Default FEC is off. packet_loss_rate_(0) { // Initial packet loss rate. codec_id_ = codec_id; // Opus has internal DTX, but we dont use it for now. @@ -207,15 +205,11 @@ int16_t ACMOpus::SetBitRateSafe(const int32_t rate) { int ACMOpus::SetFEC(bool enable_fec) { // Ask the encoder to enable FEC. if (enable_fec) { - if (WebRtcOpus_EnableFec(encoder_inst_ptr_) == 0) { - fec_enabled_ = true; + if (WebRtcOpus_EnableFec(encoder_inst_ptr_) == 0) return 0; - } } else { - if (WebRtcOpus_DisableFec(encoder_inst_ptr_) == 0) { - fec_enabled_ = false; + if (WebRtcOpus_DisableFec(encoder_inst_ptr_) == 0) return 0; - } } return -1; } diff --git a/webrtc/modules/audio_coding/main/acm2/acm_opus.h b/webrtc/modules/audio_coding/main/acm2/acm_opus.h index 7fefbd7414..dc992bbbd5 100644 --- a/webrtc/modules/audio_coding/main/acm2/acm_opus.h +++ b/webrtc/modules/audio_coding/main/acm2/acm_opus.h @@ -55,7 +55,6 @@ class ACMOpus : public ACMGenericCodec { int32_t bitrate_; int channels_; - bool fec_enabled_; int packet_loss_rate_; };