rtp包最大大小可配置

This commit is contained in:
monktan
2021-08-11 15:48:15 +08:00
parent 9e5d325e43
commit 7ed7e5386c
6 changed files with 13 additions and 6 deletions

View File

@@ -83,7 +83,8 @@ void RtpSession::onRtpPacket(const char *data, size_t len) {
}
return;
}
if (len > 1024 * 10) {
GET_CONFIG(uint32_t, rtpMaxSize, Rtp::kRtpMaxSize);
if (len > 1024 * rtpMaxSize) {
_search_rtp = true;
WarnL << "rtp包长度异常(" << len << ")发送端可能缓存溢出并覆盖开始搜索ssrc以便恢复上下文";
return;