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

Unified Diff: webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.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/opus/audio_encoder_opus.cc
diff --git a/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc b/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc
index e69b0c8fb3917be38b0c27851d763a4b77f8043e..17fa5b24b8ccdc97e3a096331ef01af82dfc6573 100644
--- a/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc
+++ b/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc
@@ -114,10 +114,10 @@ int AudioEncoderOpus::NumChannels() const {
size_t AudioEncoderOpus::MaxEncodedBytes() const {
// Calculate the number of bytes we expect the encoder to produce,
// then multiply by two to give a wide margin for error.
- int frame_size_ms = num_10ms_frames_per_packet_ * 10;
size_t bytes_per_millisecond =
- static_cast<size_t>(bitrate_bps_ / (1000 * 8) + 1);
- size_t approx_encoded_bytes = frame_size_ms * bytes_per_millisecond;
+ static_cast<size_t>(bitrate_bps_ / (1000 * 8) + 1);
+ size_t approx_encoded_bytes =
+ num_10ms_frames_per_packet_ * 10 * bytes_per_millisecond;
return 2 * approx_encoded_bytes;
}

Powered by Google App Engine
This is Rietveld 408576698