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

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

Issue 2892583002: Don't add FEC and RTX overheads when calculating a padding packet's maximum payload size. (Closed)
Patch Set: Created 3 years, 7 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 17bcc7c625009abfa7b1f9be7afa6d0a6a11b65f..d1de668e69d5ed992e6e42cab1c299b017f5610a 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_sender.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtp_sender.cc
@@ -464,10 +464,10 @@ size_t RTPSender::TrySendRedundantPayloads(size_t bytes_to_send,
size_t RTPSender::SendPadData(size_t bytes,
const PacedPacketInfo& pacing_info) {
size_t padding_bytes_in_packet;
+ size_t max_payload_size = max_packet_size_ - RtpHeaderLength();
if (audio_configured_) {
// Allow smaller padding packets for audio.
- size_t max_payload_size = max_packet_size_ - RtpHeaderLength();
padding_bytes_in_packet =
std::min(std::max(bytes, kMinAudioPaddingLength), max_payload_size);
if (padding_bytes_in_packet > kMaxPaddingLength)
@@ -477,10 +477,6 @@ size_t RTPSender::SendPadData(size_t bytes,
// RtpPacketSender, which will make sure we don't send too much padding even
// if a single packet is larger than requested.
// We do this to avoid frequently sending small packets on higher bitrates.
- size_t max_payload_size =
- max_packet_size_ - RtpHeaderLength() // RTP overhead.
- - video_->FecPacketOverhead() // FEC/ULP/RED overhead.
- - (RtxStatus() ? kRtxHeaderSize : 0); // RTX overhead.
padding_bytes_in_packet = std::min(max_payload_size, kMaxPaddingLength);
}
size_t bytes_sent = 0;
« 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