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 89231351697665320a2c0c505861cc55b0d202e1..29b2897b343714b60071cf5c094062478d2fb4ab 100644 |
--- a/webrtc/modules/rtp_rtcp/source/rtp_sender.cc |
+++ b/webrtc/modules/rtp_rtcp/source/rtp_sender.cc |
@@ -958,12 +958,12 @@ bool RTPSender::IsFecPacket(const uint8_t* buffer, |
} |
size_t RTPSender::TimeToSendPadding(size_t bytes) { |
+ if (bytes == 0) |
+ return 0; |
{ |
CriticalSectionScoped cs(send_critsect_.get()); |
if (!sending_media_) return 0; |
} |
- if (bytes == 0) |
- return 0; |
size_t bytes_sent = TrySendRedundantPayloads(bytes); |
if (bytes_sent < bytes) |
bytes_sent += TrySendPadData(bytes - bytes_sent); |