| 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..ed2d319906b873a6b3e9dc23d52ea0112b263e55 100644
|
| --- a/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc
|
| +++ b/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc
|
| @@ -205,15 +205,16 @@ RtcpMode RTCPSender::Status() const {
|
| return method_;
|
| }
|
|
|
| -void RTCPSender::SetRTCPStatus(RtcpMode method) {
|
| +void RTCPSender::SetRTCPStatus(RtcpMode new_method) {
|
| rtc::CritScope lock(&critical_section_rtcp_sender_);
|
| - method_ = method;
|
|
|
| - if (method == RtcpMode::kOff)
|
| - return;
|
| - next_time_to_send_rtcp_ =
|
| + if (method_ == RtcpMode::kOff && new_method != RtcpMode::kOff) {
|
| + // When switching on, reschedule the next packet
|
| + next_time_to_send_rtcp_ =
|
| clock_->TimeInMilliseconds() +
|
| (audio_ ? RTCP_INTERVAL_AUDIO_MS / 2 : RTCP_INTERVAL_VIDEO_MS / 2);
|
| + }
|
| + method_ = new_method;
|
| }
|
|
|
| bool RTCPSender::Sending() const {
|
|
|