Chromium Code Reviews| Index: webrtc/modules/rtp_rtcp/source/rtp_sender.cc |
| diff --git a/webrtc/modules/rtp_rtcp/source/rtp_sender.cc b/webrtc/modules/rtp_rtcp/source/rtp_sender.cc |
| index c831b5132a7c9befdd4187a2e008b3b225ef99e9..97469ca35ecf27defdfc971376e4d6ff6399b23d 100644 |
| --- a/webrtc/modules/rtp_rtcp/source/rtp_sender.cc |
| +++ b/webrtc/modules/rtp_rtcp/source/rtp_sender.cc |
| @@ -556,6 +556,8 @@ int32_t RTPSender::SendOutgoingData(FrameType frame_type, |
| size_t RTPSender::TrySendRedundantPayloads(size_t bytes_to_send) { |
| { |
| rtc::CritScope lock(&send_critsect_); |
| + if (!sending_media_) |
| + return 0; |
| if ((rtx_ & kRtxRedundantPayloads) == 0) |
| return 0; |
| } |
| @@ -618,6 +620,8 @@ size_t RTPSender::SendPadData(size_t bytes, |
| bool over_rtx; |
| { |
| rtc::CritScope lock(&send_critsect_); |
| + if (!sending_media_) |
| + return bytes_sent; |
| if (!timestamp_provided) { |
| timestamp = timestamp_; |
| capture_time_ms = capture_time_ms_; |
| @@ -1011,11 +1015,6 @@ bool RTPSender::IsFecPacket(const uint8_t* buffer, |
| size_t RTPSender::TimeToSendPadding(size_t bytes) { |
| if (audio_configured_ || bytes == 0) |
| return 0; |
| - { |
|
pbos-webrtc
2016/02/19 15:11:29
This check is now done in TrySendRedundantPayloads
|
| - rtc::CritScope lock(&send_critsect_); |
| - if (!sending_media_) |
| - return 0; |
| - } |
| size_t bytes_sent = TrySendRedundantPayloads(bytes); |
| if (bytes_sent < bytes) |
| bytes_sent += SendPadData(bytes - bytes_sent, false, 0, 0); |