Skip to content

Commit 705b728

Browse files
committed
Pass Configured MTU into SCTP
Before pion/sctp would always do 1228
1 parent 3017e68 commit 705b728

File tree

5 files changed

+6
-5
lines changed

5 files changed

+6
-5
lines changed

constants.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const (
3838

3939
sdpAttributeSimulcast = "simulcast"
4040

41-
rtpOutboundMTU = 1200
41+
outboundMTU = 1200
4242

4343
rtpPayloadTypeBitmask = 0x7F
4444

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ require (
1111
github.com/pion/randutil v0.1.0
1212
github.com/pion/rtcp v1.2.15
1313
github.com/pion/rtp v1.8.13
14-
github.com/pion/sctp v1.8.38
14+
github.com/pion/sctp v1.8.39
1515
github.com/pion/sdp/v3 v3.0.11
1616
github.com/pion/srtp/v3 v3.0.4
1717
github.com/pion/stun/v3 v3.0.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ github.com/pion/rtcp v1.2.15 h1:LZQi2JbdipLOj4eBjK4wlVoQWfrZbh3Q6eHtWtJBZBo=
5353
github.com/pion/rtcp v1.2.15/go.mod h1:jlGuAjHMEXwMUHK78RgX0UmEJFV4zUKOFHR7OP+D3D0=
5454
github.com/pion/rtp v1.8.13 h1:8uSUPpjSL4OlwZI8Ygqu7+h2p9NPFB+yAZ461Xn5sNg=
5555
github.com/pion/rtp v1.8.13/go.mod h1:8uMBJj32Pa1wwx8Fuv/AsFhn8jsgw+3rUC2PfoBZ8p4=
56-
github.com/pion/sctp v1.8.38 h1:rntHxO7CyH8jeqC/bkuirl2uJ+BqTp2uxhisi5AYPRQ=
57-
github.com/pion/sctp v1.8.38/go.mod h1:cNiLdchXra8fHQwmIoqw0MbLLMs+f7uQ+dGMG2gWebE=
56+
github.com/pion/sctp v1.8.39 h1:PJma40vRHa3UTO3C4MyeJDQ+KIobVYRZQZ0Nt7SjQnE=
57+
github.com/pion/sctp v1.8.39/go.mod h1:cNiLdchXra8fHQwmIoqw0MbLLMs+f7uQ+dGMG2gWebE=
5858
github.com/pion/sdp/v3 v3.0.11 h1:VhgVSopdsBKwhCFoyyPmT1fKMeV9nLMrEKxNOdy3IVI=
5959
github.com/pion/sdp/v3 v3.0.11/go.mod h1:88GMahN5xnScv1hIMTqLdu/cOcUkj6a9ytbncwMCq2E=
6060
github.com/pion/srtp/v3 v3.0.4 h1:2Z6vDVxzrX3UHEgrUyIGM4rRouoC7v+NiF1IHtp9B5M=

sctptransport.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ func (r *SCTPTransport) Start(capabilities SCTPCapabilities) error {
120120
RTOMax: float64(r.api.settingEngine.sctp.rtoMax) / float64(time.Millisecond),
121121
BlockWrite: r.api.settingEngine.detach.DataChannels && r.api.settingEngine.dataChannelBlockWrite,
122122
MaxMessageSize: maxMessageSize,
123+
MTU: outboundMTU,
123124
})
124125
if err != nil {
125126
return err

track_local_static.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ func (s *TrackLocalStaticSample) Bind(t TrackLocalContext) (RTPCodecParameters,
283283

284284
s.sequencer = rtp.NewRandomSequencer()
285285
s.packetizer = rtp.NewPacketizer(
286-
rtpOutboundMTU,
286+
outboundMTU,
287287
0, // Value is handled when writing
288288
0, // Value is handled when writing
289289
payloader,

0 commit comments

Comments
 (0)