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