From 5e70fd3d8f8197d317406a0f3b4a52bcfc0ba6a8 Mon Sep 17 00:00:00 2001 From: Denis Genestier Date: Wed, 21 Aug 2024 12:17:15 +0200 Subject: [PATCH] fix of a compilation error in Visual Studio 2022 due to a warning C4244. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: webrtc:353294048 Change-Id: I8c40a9df06464b9ffd7112fd7d070dee2d0e5ca4 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/360140 Reviewed-by: Danil Chapovalov Reviewed-by: Åsa Persson Commit-Queue: Danil Chapovalov Cr-Commit-Position: refs/heads/main@{#42825} --- AUTHORS | 1 + modules/rtp_rtcp/include/report_block_data.h | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index 1da037f079..d838c46492 100644 --- a/AUTHORS +++ b/AUTHORS @@ -43,6 +43,7 @@ Dave Cowart David Porter David Sanders Dax Booysen +Denis Genestier Dennis Angelo Dharmesh Chauhan Di Wu diff --git a/modules/rtp_rtcp/include/report_block_data.h b/modules/rtp_rtcp/include/report_block_data.h index 9987fc46b9..f6a23b1bb2 100644 --- a/modules/rtp_rtcp/include/report_block_data.h +++ b/modules/rtp_rtcp/include/report_block_data.h @@ -38,7 +38,9 @@ class ReportBlockData { // The fraction of RTP data packets from 'source_ssrc()' lost since the // previous report block was sent. // Fraction loss in range [0.0, 1.0]. - float fraction_lost() const { return fraction_lost_raw() / 256.0; } + float fraction_lost() const { + return static_cast(fraction_lost_raw()) / 256.0f; + } // Fraction loss as was written in the raw packet: range is [0, 255] where 0 // represents no loss, and 255 represents 99.6% loss (255/256 * 100%).