diff --git a/janus/src/rtp.h b/janus/src/rtp.h index 8af07d7..650ddde 100644 --- a/janus/src/rtp.h +++ b/janus/src/rtp.h @@ -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)