mirror of
https://github.com/pikvm/ustreamer.git
synced 2026-02-18 02:55:46 +00:00
janus: fixed compatibility with Tailscale MTU (#325)
This commit is contained in:
parent
5331ae14aa
commit
8c69c77481
@ -27,8 +27,13 @@
|
|||||||
|
|
||||||
// Max RTP size for WebRTC is 1200 bytes:
|
// Max RTP size for WebRTC is 1200 bytes:
|
||||||
// - https://stackoverflow.com/questions/47635545/why-webrtc-chose-rtp-max-packet-size-to-1200-bytes
|
// - https://stackoverflow.com/questions/47635545/why-webrtc-chose-rtp-max-packet-size-to-1200-bytes
|
||||||
// We take this and substract 50 bytes for possible RTP extensions, see sdp.c
|
// But(!) Tailscale has 1200 MTU. So to fit it required to substract:
|
||||||
#define US_RTP_TOTAL_SIZE (1200 - 50)
|
// 1. possible RTP extensions (see sdp.c)
|
||||||
|
// 2. additional SRTP fields (>= 10 bytes)
|
||||||
|
// 3. UDP header (8 bytes)
|
||||||
|
// 4. IPv6 header (40 bytes)
|
||||||
|
// Finally it looks like 100 bytes for all above should be enough
|
||||||
|
#define US_RTP_TOTAL_SIZE (1200 - 100)
|
||||||
#define US_RTP_HEADER_SIZE 12
|
#define US_RTP_HEADER_SIZE 12
|
||||||
#define US_RTP_PAYLOAD_SIZE (US_RTP_TOTAL_SIZE - US_RTP_HEADER_SIZE)
|
#define US_RTP_PAYLOAD_SIZE (US_RTP_TOTAL_SIZE - US_RTP_HEADER_SIZE)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user