Index: webrtc/modules/rtp_rtcp/source/rtcp_sender.cc |
diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc b/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc |
index a5fccebad1dd67eb792fcf70ae402fafdcac5700..0a0304e485c97a8d984d6d852ed6402d9dcd4043 100644 |
--- a/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc |
+++ b/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc |
@@ -207,13 +207,17 @@ RtcpMode RTCPSender::Status() const { |
void RTCPSender::SetRTCPStatus(RtcpMode method) { |
rtc::CritScope lock(&critical_section_rtcp_sender_); |
+ bool was_off = (method_ == RtcpMode::kOff); |
pbos-webrtc
2016/03/29 17:48:46
remove ()s
skvlad
2016/03/29 18:09:25
Done.
|
method_ = method; |
if (method == RtcpMode::kOff) |
return; |
- next_time_to_send_rtcp_ = |
- clock_->TimeInMilliseconds() + |
- (audio_ ? RTCP_INTERVAL_AUDIO_MS / 2 : RTCP_INTERVAL_VIDEO_MS / 2); |
+ |
+ if (was_off) { |
+ next_time_to_send_rtcp_ = |
+ clock_->TimeInMilliseconds() + |
+ (audio_ ? RTCP_INTERVAL_AUDIO_MS / 2 : RTCP_INTERVAL_VIDEO_MS / 2); |
+ } |
pthatcher1
2016/03/25 23:03:40
Might be more clear as:
if (method == method_)
skvlad
2016/03/29 18:09:25
There are three possible values for RtcpMode: kOff
pthatcher
2016/03/29 18:53:09
Ah, true.
Well, how about this?
if (method == m
skvlad
2016/03/29 19:51:31
Good idea; i've replaced it with a slightly modifi
|
} |
bool RTCPSender::Sending() const { |