Index: webrtc/modules/audio_coding/neteq/decoder_database.h |
diff --git a/webrtc/modules/audio_coding/neteq/decoder_database.h b/webrtc/modules/audio_coding/neteq/decoder_database.h |
index 14548749bf83095953377f6072ab9b570770bfbd..51098b6213875402f73e23d7e9a87bd4db131ff8 100644 |
--- a/webrtc/modules/audio_coding/neteq/decoder_database.h |
+++ b/webrtc/modules/audio_coding/neteq/decoder_database.h |
@@ -59,10 +59,14 @@ class DecoderDatabase { |
void DropDecoder() const { decoder_.reset(); } |
int SampleRateHz() const { |
- RTC_DCHECK_EQ(1, !!decoder_ + !!external_decoder_ + !!cng_decoder_); |
- return decoder_ ? decoder_->SampleRateHz() |
- : external_decoder_ ? external_decoder_->SampleRateHz() |
- : cng_decoder_->sample_rate_hz; |
+ const AudioDecoder *decoder = GetDecoder(); |
hlundin-webrtc
2016/08/26 11:34:46
Join the type with the asterisk.
kwiberg-webrtc
2016/08/26 11:40:57
Better yet, get in the habit of running git cl for
ossu
2016/08/26 11:47:31
I often do that on single statements I add - mostl
kwiberg-webrtc
2016/08/26 12:30:07
I make sure to commit locally when I'm done, then
hlundin-webrtc
2016/08/26 12:41:50
Sisyphus as well as Don Quixote spring to mind...
|
+ RTC_DCHECK_EQ(1, !!decoder + !!cng_decoder_); |
+ return decoder ? decoder->SampleRateHz() : cng_decoder_->sample_rate_hz; |
+ } |
+ |
+ const SdpAudioFormat& GetFormat() const { |
+ RTC_DCHECK(audio_format_); |
+ return *audio_format_; |
} |
// Returns true if |codec_type| is comfort noise. |