From 0281cb6a11ea7c05ccb0db232299f6da1828e4f3 Mon Sep 17 00:00:00 2001 From: ziyue <1213642868@qq.com> Date: Fri, 19 Nov 2021 11:09:55 +0800 Subject: [PATCH] =?UTF-8?q?GB28181:=20=E4=BF=AE=E5=A4=8Dtcp=E6=8E=A8?= =?UTF-8?q?=E6=B5=81=E6=97=B6=EF=BC=8C=E6=B5=81=E5=BC=82=E5=B8=B8=E5=8F=AF?= =?UTF-8?q?=E8=83=BD=E5=AF=BC=E8=87=B4=E6=AD=BB=E5=BE=AA=E7=8E=AF=E7=9A=84?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Rtp/RtpSession.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Rtp/RtpSession.cpp b/src/Rtp/RtpSession.cpp index 57a511e4..58b8c73f 100644 --- a/src/Rtp/RtpSession.cpp +++ b/src/Rtp/RtpSession.cpp @@ -177,6 +177,10 @@ const char *RtpSession::onSearchPacketTail(const char *data, size_t len) { if (ssrc_offset == rtp_len + 2 || ssrc_offset == rtp_len + 4) { InfoL << "rtp搜索成功,tcp上下文恢复成功,丢弃的rtp残余数据为:" << rtp_len_ptr - data; _search_rtp_finished = true; + if (rtp_len_ptr == data) { + //停止搜索rtp,否则会进入死循环 + _search_rtp = false; + } //前面的数据都需要丢弃,这个是rtp的起始 return rtp_len_ptr; }