Index: webrtc/modules/audio_coding/neteq/decoder_database.cc |
diff --git a/webrtc/modules/audio_coding/neteq/decoder_database.cc b/webrtc/modules/audio_coding/neteq/decoder_database.cc |
index 165522f0dffb0851ad117e62654e2b60d5185f66..d5d3af4a4754e762a1077bfa2f8b58389dcd60a8 100644 |
--- a/webrtc/modules/audio_coding/neteq/decoder_database.cc |
+++ b/webrtc/modules/audio_coding/neteq/decoder_database.cc |
@@ -65,21 +65,17 @@ AudioDecoder* DecoderDatabase::DecoderInfo::GetDecoder( |
rtc::Optional<DecoderDatabase::DecoderInfo::CngDecoder> |
DecoderDatabase::DecoderInfo::CngDecoder::Create(NetEqDecoder ct) { |
- const auto cng = [](int sample_rate_hz) { |
- return rtc::Optional<DecoderDatabase::DecoderInfo::CngDecoder>( |
- {sample_rate_hz}); |
- }; |
switch (ct) { |
case NetEqDecoder::kDecoderCNGnb: |
- return cng(8000); |
+ return CngDecoder{8000}; |
case NetEqDecoder::kDecoderCNGwb: |
- return cng(16000); |
+ return CngDecoder{16000}; |
case NetEqDecoder::kDecoderCNGswb32kHz: |
- return cng(32000); |
+ return CngDecoder{32000}; |
case NetEqDecoder::kDecoderCNGswb48kHz: |
- return cng(48000); |
+ return CngDecoder{48000}; |
default: |
- return rtc::Optional<DecoderDatabase::DecoderInfo::CngDecoder>(); |
+ return rtc::nullopt; |
} |
} |