复用rtp/rtcp判断逻辑过滤非rtp包: #2247

This commit is contained in:
xiongziliang
2023-02-28 22:23:30 +08:00
parent dc8508c58f
commit c2e1083493
5 changed files with 31 additions and 21 deletions

View File

@@ -12,6 +12,7 @@
#include "RtpSession.h"
#include "RtpSelector.h"
#include "Network/TcpServer.h"
#include "Rtsp/Rtsp.h"
#include "Rtsp/RtpReceiver.h"
#include "Common/config.h"
@@ -93,6 +94,10 @@ void RtpSession::onRtpPacket(const char *data, size_t len) {
}
}
if (!_process) {
if (!isRtp(data, len)) {
WarnP(this) << "Not rtp packet";
return;
}
//未设置ssrc时尝试获取ssrc
if (!_ssrc && !RtpSelector::getSSRC(data, len, _ssrc)) {
return;