Bugfix: VCM would report wrong sentBitrate

issue: https://code.google.com/p/webrtc/issues/detail?id=1755

R=stefan@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/1484004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4048 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
marpan@webrtc.org 2013-05-16 15:38:44 +00:00
parent 9919ad5caf
commit 890f6092e6

View File

@ -457,7 +457,7 @@ void VCMMediaOptimization::UpdateSentBitrate(int64_t now_ms) {
framesize_sum += it->size_bytes;
}
float denom = static_cast<float>(
now_ms - _encodedFrameSamples.back().time_complete_ms);
now_ms - _encodedFrameSamples.front().time_complete_ms);
if (denom >= 1.0f) {
_avgSentBitRateBps = static_cast<uint32_t>(framesize_sum * 8 * 1000 /
denom + 0.5f);