Fixed issue with how MTU is calculated.
BUG= R=holmer@google.com, stefan@webrtc.org Review URL: https://webrtc-codereview.appspot.com/2410004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4976 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
b400aa7cd4
commit
25fce9adc5
@ -166,8 +166,8 @@ VideoSendStream::VideoSendStream(newapi::Transport* transport,
|
||||
assert(network_ != NULL);
|
||||
|
||||
network_->RegisterSendTransport(channel_, transport_adapter_);
|
||||
network_->SetMTU(channel_, config_.rtp.max_packet_size +
|
||||
VideoSendStream::Config::kDefaultPacketOverheader);
|
||||
// 28 to match packet overhead in ModuleRtpRtcpImpl.
|
||||
network_->SetMTU(channel_, config_.rtp.max_packet_size + 28);
|
||||
|
||||
if (config.encoder) {
|
||||
external_codec_ = ViEExternalCodec::GetInterface(video_engine);
|
||||
|
@ -84,8 +84,7 @@ class VideoSendStream {
|
||||
start_state(NULL) {}
|
||||
VideoCodec codec;
|
||||
|
||||
static const size_t kDefaultPacketOverheader = 20 + 20; // IPv4 + TCP
|
||||
static const size_t kDefaultMaxPacketSize = 1500 - kDefaultPacketOverheader;
|
||||
static const size_t kDefaultMaxPacketSize = 1500 - 40; // TCP over IPv4.
|
||||
struct Rtp {
|
||||
Rtp() : mode(newapi::kRtcpReducedSize),
|
||||
max_packet_size(kDefaultMaxPacketSize) {}
|
||||
|
@ -443,7 +443,7 @@ TEST_F(VideoSendStreamTest, MaxPacketSize) {
|
||||
EXPECT_TRUE(
|
||||
rtp_header_parser_->Parse(packet, static_cast<int>(length), &header));
|
||||
|
||||
EXPECT_TRUE(length <= max_length_);
|
||||
EXPECT_LE(length, max_length_);
|
||||
|
||||
accumulated_size_ += length;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user