Skip to content

Commit a05eab7

Browse files
committed
janus: reserve 50 bytes for RTP extensions
1 parent e013356 commit a05eab7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

janus/src/rtp.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@
2525
#include "uslibs/types.h"
2626

2727

28-
// https://stackoverflow.com/questions/47635545/why-webrtc-chose-rtp-max-packet-size-to-1200-bytes
29-
#define US_RTP_TOTAL_SIZE 1200
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)
3032
#define US_RTP_HEADER_SIZE 12
3133
#define US_RTP_PAYLOAD_SIZE (US_RTP_TOTAL_SIZE - US_RTP_HEADER_SIZE)
3234

0 commit comments

Comments
 (0)