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

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

Issue 2354843003: Add sanity check for decreasing RTP timestamp in RtpToNtpMs. (Closed)
Patch Set: remove {} Created 4 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 | « 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 6504737fd54bb32d84125bba2f8e4159a7005006..05091461d4123ff9bfbea041bd18187a0c411e02 100644
--- a/webrtc/system_wrappers/source/rtp_to_ntp.cc
+++ b/webrtc/system_wrappers/source/rtp_to_ntp.cc
@@ -110,6 +110,9 @@ bool RtpToNtpMs(int64_t rtp_timestamp,
&rtcp_timestamp_new)) {
return false;
}
+ if (rtcp_timestamp_new < rtcp_timestamp_old)
+ return false;
+
double freq_khz;
if (!CalculateFrequency(rtcp_ntp_ms_new,
rtcp_timestamp_new,
« 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