Fix integer divisin truncation error.

Patch fix from: thakis@chromium.org
https://webrtc-codereview.appspot.com/717006/

TBR=andrew@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/721006

git-svn-id: http://webrtc.googlecode.com/svn/trunk@2555 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
marpan@webrtc.org 2012-08-03 17:33:13 +00:00
parent 10a31520a5
commit 4889120a84

View File

@ -191,8 +191,8 @@ bool ProducerFec::ExcessOverheadBelowMax() {
// that, for the same amount of protection/overhead, longer codes
// (e.g. (2k,2m) vs (k,m)) are generally more effective at recovering losses.
bool ProducerFec::MinimumMediaPacketsReached() {
float avg_num_packets_frame = static_cast<float>(media_packets_fec_.size() /
num_frames_);
float avg_num_packets_frame = static_cast<float>(media_packets_fec_.size()) /
num_frames_;
if (avg_num_packets_frame < 2.0f) {
return (static_cast<int>(media_packets_fec_.size()) >=
minimum_media_packets_fec_);