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

Unified Diff: webrtc/modules/audio_coding/codecs/ilbc/audio_encoder_ilbc.cc

Issue 1172163004: Reformat existing code. There should be no functional effects. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Resync Created 5 years, 6 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/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)

Powered by Google App Engine
This is Rietveld 408576698