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

Unified Diff: webrtc/system_wrappers/source/rtp_to_ntp.cc

Issue 1891703002: Potential division by zero in RtpToNtpMs() (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 8 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 | webrtc/system_wrappers/source/rtp_to_ntp_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/system_wrappers/source/rtp_to_ntp.cc
diff --git a/webrtc/system_wrappers/source/rtp_to_ntp.cc b/webrtc/system_wrappers/source/rtp_to_ntp.cc
index 706d861b55c82b0457516131c87b2412e87c16ca..6504737fd54bb32d84125bba2f8e4159a7005006 100644
--- a/webrtc/system_wrappers/source/rtp_to_ntp.cc
+++ b/webrtc/system_wrappers/source/rtp_to_ntp.cc
@@ -71,8 +71,9 @@ bool UpdateRtcpList(uint32_t ntp_secs,
for (RtcpList::iterator it = rtcp_list->begin();
it != rtcp_list->end(); ++it) {
- if (measurement.ntp_secs == (*it).ntp_secs &&
- measurement.ntp_frac == (*it).ntp_frac) {
+ if ((measurement.ntp_secs == (*it).ntp_secs &&
+ measurement.ntp_frac == (*it).ntp_frac) ||
+ (measurement.rtp_timestamp == (*it).rtp_timestamp)) {
// This RTCP has already been added to the list.
return true;
}
« no previous file with comments | « no previous file | webrtc/system_wrappers/source/rtp_to_ntp_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698