Skip to content

Commit

Permalink
For #307: Change the RTP payload to 1300
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Apr 15, 2020
1 parent b5f2c84 commit bfc70d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion trunk/src/app/srs_app_rtc_conn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ using namespace std;
// kRtpPacketSize = kRtpMaxPayloadSize + paddings
// For example, if kRtpPacketSize is 1500, recommend to set kRtpMaxPayloadSize to 1400,
// which reserves 100 bytes for SRTP or paddings.
const int kRtpMaxPayloadSize = kRtpPacketSize - 100;
const int kRtpMaxPayloadSize = kRtpPacketSize - 200;

static bool is_stun(const uint8_t* data, const int size)
{
Expand Down

1 comment on commit bfc70d6

@winlinvip
Copy link
Member Author

@winlinvip winlinvip commented on bfc70d6 Apr 15, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IP头20字节,UDP头8字节,RTP头12字节,FUA头2字节,SRTP尾10字节(最大是 SRTP_MAX_TAG_LEN 16 字节)。
如果设置FUA-Payload为1300字节,那么UDP大小是1300+20+8+12+2+10=1352字节。

image

image

Please sign in to comment.