From 094f7553c9304ab112176e2ee9acb110c173daf7 Mon Sep 17 00:00:00 2001 From: ziyue <1213642868@qq.com> Date: Thu, 12 Aug 2021 10:43:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=B9=B6pr(rtp=E6=9C=80=E5=A4=A7?= =?UTF-8?q?=E5=A4=A7=E5=B0=8F=E5=8F=AF=E9=85=8D=E7=BD=AE)=EF=BC=9A#1028?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- conf/config.ini | 2 +- src/Common/config.cpp | 2 +- src/Common/config.h | 2 +- tests/test_rtp.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/conf/config.ini b/conf/config.ini index cc141882..abff3892 100644 --- a/conf/config.ini +++ b/conf/config.ini @@ -201,7 +201,7 @@ sslport=19350 audioMtuSize=600 #视频mtu大小,该参数限制rtp最大字节数,推荐不要超过1400 videoMtuSize=1400 -#rtp包最大长度限制,可以降低内存分配,单位k +#rtp包最大长度限制,单位KB,主要用于识别TCP上下文破坏时,获取到错误的rtp rtpMaxSize=10 [rtp_proxy] diff --git a/src/Common/config.cpp b/src/Common/config.cpp index 72760a8b..42626291 100644 --- a/src/Common/config.cpp +++ b/src/Common/config.cpp @@ -192,7 +192,7 @@ namespace Rtp { //RTP打包最大MTU,公网情况下更小 const string kVideoMtuSize = RTP_FIELD"videoMtuSize"; const string kAudioMtuSize = RTP_FIELD"audioMtuSize"; -//rtp包最大长度限制,单位是k +//rtp包最大长度限制,单位是KB const string kRtpMaxSize = RTP_FIELD"rtpMaxSize"; onceToken token([](){ diff --git a/src/Common/config.h b/src/Common/config.h index f3bf2d18..fe2f6605 100644 --- a/src/Common/config.h +++ b/src/Common/config.h @@ -228,7 +228,7 @@ namespace Rtp { extern const string kVideoMtuSize; //RTP打包最大MTU,公网情况下更小 extern const string kAudioMtuSize; -//rtp包最大长度限制, 单位k +//rtp包最大长度限制, 单位KB extern const string kRtpMaxSize; } //namespace Rtsp diff --git a/tests/test_rtp.cpp b/tests/test_rtp.cpp index c14dabf0..0b17ed3f 100644 --- a/tests/test_rtp.cpp +++ b/tests/test_rtp.cpp @@ -36,7 +36,7 @@ static bool loadFile(const char *path){ uint32_t timeStamp_last = 0; uint16_t len; - char rtp[50 * 1024]; + char rtp[0xFFFF]; struct sockaddr addr = {0}; auto sock = Socket::createSocket(); size_t total_size = 0;