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; |
} |