Index: webrtc/modules/audio_coding/codecs/ilbc/audio_encoder_ilbc.cc |
diff --git a/webrtc/modules/audio_coding/codecs/ilbc/audio_encoder_ilbc.cc b/webrtc/modules/audio_coding/codecs/ilbc/audio_encoder_ilbc.cc |
index 4fea44babdded8cb51b3aac1f736d51441d34365..66d24650a659d9b505dca51cdff39b0527bac6e2 100644 |
--- a/webrtc/modules/audio_coding/codecs/ilbc/audio_encoder_ilbc.cc |
+++ b/webrtc/modules/audio_coding/codecs/ilbc/audio_encoder_ilbc.cc |
@@ -25,12 +25,9 @@ const int kSampleRateHz = 8000; |
} // namespace |
bool AudioEncoderIlbc::Config::IsOk() const { |
- if (!(frame_size_ms == 20 || frame_size_ms == 30 || frame_size_ms == 40 || |
- frame_size_ms == 60)) |
- return false; |
- if (kSampleRateHz / 100 * (frame_size_ms / 10) > kMaxSamplesPerPacket) |
- return false; |
- return true; |
+ return (frame_size_ms == 20 || frame_size_ms == 30 || frame_size_ms == 40 || |
+ frame_size_ms == 60) && |
+ (kSampleRateHz / 100 * (frame_size_ms / 10)) <= kMaxSamplesPerPacket; |
} |
AudioEncoderIlbc::AudioEncoderIlbc(const Config& config) |