janus: reserve 50 bytes for RTP extensions

This commit is contained in:
Maxim Devaev 2026-02-12 19:34:39 +02:00
parent e013356cf0
commit a05eab71a8

View File

@ -25,8 +25,10 @@
#include "uslibs/types.h"
// https://stackoverflow.com/questions/47635545/why-webrtc-chose-rtp-max-packet-size-to-1200-bytes
#define US_RTP_TOTAL_SIZE 1200
// Max RTP size for WebRTC is 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
#define US_RTP_TOTAL_SIZE (1200 - 50)
#define US_RTP_HEADER_SIZE 12
#define US_RTP_PAYLOAD_SIZE (US_RTP_TOTAL_SIZE - US_RTP_HEADER_SIZE)