From 74451a5ea97a1f8f30acba142d829728813bb0a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Bostr=C3=B6m?= Date: Mon, 1 Feb 2016 16:31:10 +0100 Subject: [PATCH] Prevent zero division in VCMJitterEstimator. BUG=webrtc:5124 R=sprang@webrtc.org, stefan@webrtc.org Review URL: https://codereview.webrtc.org/1652903002 . Cr-Commit-Position: refs/heads/master@{#11445} --- webrtc/modules/video_coding/jitter_estimator.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webrtc/modules/video_coding/jitter_estimator.cc b/webrtc/modules/video_coding/jitter_estimator.cc index 8270c60e01..b92ed67e11 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();