We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5331ae1 commit 285c27bCopy full SHA for 285c27b
janus/src/rtp.h
@@ -27,8 +27,12 @@
27
28
// Max RTP size for WebRTC is 1200 bytes:
29
// - https://stackoverflow.com/questions/47635545/why-webrtc-chose-rtp-max-packet-size-to-1200-bytes
30
-// We take this and substract 50 bytes for possible RTP extensions, see sdp.c
31
-#define US_RTP_TOTAL_SIZE (1200 - 50)
+// But(!) Tailscale has 1200 MTU. So to fit it required to substract:
+// 1. possible RTP extensions (see sdp.c)
32
+// 2. additional SRTP fields (>= 10 bytes)
33
+// 3. additional IPv6 fields (40 bytes)
34
+// Finally it looks like 100 bytes for all above should be enough
35
+#define US_RTP_TOTAL_SIZE (1200 - 100)
36
#define US_RTP_HEADER_SIZE 12
37
#define US_RTP_PAYLOAD_SIZE (US_RTP_TOTAL_SIZE - US_RTP_HEADER_SIZE)
38
0 commit comments