From 7a994334f13501c5fc95559c75a1a238a5f481f6 Mon Sep 17 00:00:00 2001 From: Sebastian Jansson Date: Tue, 11 Jun 2019 10:28:20 +0200 Subject: [PATCH] Avoids crash in VCMJitterEstimator due to incorrectly calculated mean FPS. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: webrtc:10728 Change-Id: I9e50ebdcfd9ef7d408cbf00111f29f0c80fd6c75 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/141402 Commit-Queue: Sebastian Jansson Reviewed-by: Erik Språng Cr-Commit-Position: refs/heads/master@{#28226} --- modules/video_coding/jitter_estimator.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/video_coding/jitter_estimator.cc b/modules/video_coding/jitter_estimator.cc index 55efdf83f6..7f54aad808 100644 --- a/modules/video_coding/jitter_estimator.cc +++ b/modules/video_coding/jitter_estimator.cc @@ -416,7 +416,7 @@ int VCMJitterEstimator::GetJitterEstimate( } double VCMJitterEstimator::GetFrameRate() const { - if (fps_counter_.ComputeMean() == 0.0) + if (fps_counter_.ComputeMean() <= 0.0) return 0; double fps = 1000000.0 / fps_counter_.ComputeMean();