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

Unified Diff: webrtc/modules/rtp_rtcp/source/rtp_sender.cc

Issue 3005003002: Make UBSan warnings fatal and fix the existing ones (Closed)
Patch Set: Revert one fix because the overflow was relied on Created 3 years, 3 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 | « webrtc/modules/pacing/alr_detector.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/rtp_rtcp/source/rtp_sender.cc
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_sender.cc b/webrtc/modules/rtp_rtcp/source/rtp_sender.cc
index 89e7735c7a4da9ae45dd42f0ed15ade497a28b79..5d67004c1ef5d0b38c4eb713dfa7aeadbbf21735 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_sender.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtp_sender.cc
@@ -925,7 +925,7 @@ void RTPSender::UpdateDelayStatistics(int64_t capture_time_ms, int64_t now_ms) {
return;
uint32_t ssrc;
- int avg_delay_ms = 0;
+ int64_t avg_delay_ms = 0;
int max_delay_ms = 0;
{
rtc::CritScope lock(&send_critsect_);
@@ -951,8 +951,8 @@ void RTPSender::UpdateDelayStatistics(int64_t capture_time_ms, int64_t now_ms) {
return;
avg_delay_ms = (avg_delay_ms + num_delays / 2) / num_delays;
}
- send_side_delay_observer_->SendSideDelayUpdated(avg_delay_ms, max_delay_ms,
- ssrc);
+ send_side_delay_observer_->SendSideDelayUpdated(
+ rtc::dchecked_cast<int>(avg_delay_ms), max_delay_ms, ssrc);
}
void RTPSender::UpdateOnSendPacket(int packet_id,
« no previous file with comments | « webrtc/modules/pacing/alr_detector.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698