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

Unified Diff: webrtc/modules/video_coding/jitter_estimator.cc

Issue 1652903002: Prevent zero division in VCMJitterEstimator. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/video_coding/jitter_estimator.cc
diff --git a/webrtc/modules/video_coding/jitter_estimator.cc b/webrtc/modules/video_coding/jitter_estimator.cc
index 8270c60e01f1796470ab9c575afccc99ebe9eb40..b92ed67e110dc424a184c599b3864c657773d90e 100644
--- a/webrtc/modules/video_coding/jitter_estimator.cc
+++ b/webrtc/modules/video_coding/jitter_estimator.cc
@@ -429,7 +429,7 @@ bool VCMJitterEstimator::LowRateExperimentEnabled() {
}
double VCMJitterEstimator::GetFrameRate() const {
- if (fps_counter_.count() == 0)
+ if (fps_counter_.ComputeMean() == 0.0)
return 0;
double fps = 1000000.0 / fps_counter_.ComputeMean();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698