mirror of
https://github.com/pion/webrtc.git
synced 2025-12-24 11:51:03 +08:00
Pass Configured MTU into SCTP
Before pion/sctp would always do 1228
This commit is contained in:
@@ -38,7 +38,7 @@ const (
|
||||
|
||||
sdpAttributeSimulcast = "simulcast"
|
||||
|
||||
rtpOutboundMTU = 1200
|
||||
outboundMTU = 1200
|
||||
|
||||
rtpPayloadTypeBitmask = 0x7F
|
||||
|
||||
|
||||
2
go.mod
2
go.mod
@@ -11,7 +11,7 @@ require (
|
||||
github.com/pion/randutil v0.1.0
|
||||
github.com/pion/rtcp v1.2.15
|
||||
github.com/pion/rtp v1.8.13
|
||||
github.com/pion/sctp v1.8.38
|
||||
github.com/pion/sctp v1.8.39
|
||||
github.com/pion/sdp/v3 v3.0.11
|
||||
github.com/pion/srtp/v3 v3.0.4
|
||||
github.com/pion/stun/v3 v3.0.0
|
||||
|
||||
4
go.sum
4
go.sum
@@ -53,8 +53,8 @@ github.com/pion/rtcp v1.2.15 h1:LZQi2JbdipLOj4eBjK4wlVoQWfrZbh3Q6eHtWtJBZBo=
|
||||
github.com/pion/rtcp v1.2.15/go.mod h1:jlGuAjHMEXwMUHK78RgX0UmEJFV4zUKOFHR7OP+D3D0=
|
||||
github.com/pion/rtp v1.8.13 h1:8uSUPpjSL4OlwZI8Ygqu7+h2p9NPFB+yAZ461Xn5sNg=
|
||||
github.com/pion/rtp v1.8.13/go.mod h1:8uMBJj32Pa1wwx8Fuv/AsFhn8jsgw+3rUC2PfoBZ8p4=
|
||||
github.com/pion/sctp v1.8.38 h1:rntHxO7CyH8jeqC/bkuirl2uJ+BqTp2uxhisi5AYPRQ=
|
||||
github.com/pion/sctp v1.8.38/go.mod h1:cNiLdchXra8fHQwmIoqw0MbLLMs+f7uQ+dGMG2gWebE=
|
||||
github.com/pion/sctp v1.8.39 h1:PJma40vRHa3UTO3C4MyeJDQ+KIobVYRZQZ0Nt7SjQnE=
|
||||
github.com/pion/sctp v1.8.39/go.mod h1:cNiLdchXra8fHQwmIoqw0MbLLMs+f7uQ+dGMG2gWebE=
|
||||
github.com/pion/sdp/v3 v3.0.11 h1:VhgVSopdsBKwhCFoyyPmT1fKMeV9nLMrEKxNOdy3IVI=
|
||||
github.com/pion/sdp/v3 v3.0.11/go.mod h1:88GMahN5xnScv1hIMTqLdu/cOcUkj6a9ytbncwMCq2E=
|
||||
github.com/pion/srtp/v3 v3.0.4 h1:2Z6vDVxzrX3UHEgrUyIGM4rRouoC7v+NiF1IHtp9B5M=
|
||||
|
||||
@@ -120,6 +120,7 @@ func (r *SCTPTransport) Start(capabilities SCTPCapabilities) error {
|
||||
RTOMax: float64(r.api.settingEngine.sctp.rtoMax) / float64(time.Millisecond),
|
||||
BlockWrite: r.api.settingEngine.detach.DataChannels && r.api.settingEngine.dataChannelBlockWrite,
|
||||
MaxMessageSize: maxMessageSize,
|
||||
MTU: outboundMTU,
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
@@ -283,7 +283,7 @@ func (s *TrackLocalStaticSample) Bind(t TrackLocalContext) (RTPCodecParameters,
|
||||
|
||||
s.sequencer = rtp.NewRandomSequencer()
|
||||
s.packetizer = rtp.NewPacketizer(
|
||||
rtpOutboundMTU,
|
||||
outboundMTU,
|
||||
0, // Value is handled when writing
|
||||
0, // Value is handled when writing
|
||||
payloader,
|
||||
|
||||
Reference in New Issue
Block a user