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

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: 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 1eeb5caa9f53795989d2ae38d5bfba7d136c7cd0..4452eefb8d5e89bdc142a9951f9a573652cc6479 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,9 @@ 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;
int bytes_per_millisecond = bitrate_bps_ / (1000 * 8) + 1;
- size_t approx_encoded_bytes =
- static_cast<size_t>(frame_size_ms * bytes_per_millisecond);
+ size_t approx_encoded_bytes = static_cast<size_t>(
+ num_10ms_frames_per_packet_ * 10 * bytes_per_millisecond);
return 2 * approx_encoded_bytes;
}

Powered by Google App Engine
This is Rietveld 408576698