Don't add FEC and RTX overheads when calculating a padding packet's maximum payload size.
BUG=webrtc:7433 Review-Url: https://codereview.webrtc.org/2892583002 Cr-Commit-Position: refs/heads/master@{#18184}
This commit is contained in:
parent
d743c8dd68
commit
76a5593835
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user