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 |