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

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

Issue 1506103006: Prevent RTCP SR to be sent with bogus timestamp. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years 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
Index: webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc b/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc
index 451f8bfa9398e4227b5542580e6dc9658fcfc553..0a6ea5a7ec04524f33584262706cd11aa5a98a5b 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc
@@ -183,8 +183,13 @@ int32_t ModuleRtpRtcpImpl::Process() {
set_rtt_ms(rtt_stats_->LastProcessedRtt());
}
- if (rtcp_sender_.TimeToSendRTCPReport())
- rtcp_sender_.SendRTCP(GetFeedbackState(), kRtcpReport);
+ // For sending streams, make sure to not send a SR before media has been sent.
+ if (rtcp_sender_.TimeToSendRTCPReport()) {
+ RTCPSender::FeedbackState state = GetFeedbackState();
+ // Prevent send streams to send SR before any media has been sent.
+ if (!rtcp_sender_.Sending() || state.packets_sent > 0)
+ rtcp_sender_.SendRTCP(state, kRtcpReport);
+ }
if (UpdateRTCPReceiveInformationTimers()) {
// A receiver has timed out

Powered by Google App Engine
This is Rietveld 408576698