Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2050)

Unified Diff: webrtc/modules/rtp_rtcp/source/rtp_sender.cc

Issue 1218093002: Move early-return in TimeToSendPadding. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698