From 49c8d4fb8df1f37a34c4c4ffa8f9f5aec8f1b308 Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Wed, 16 Jan 2019 17:58:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Drtsp=E6=8E=A8=E6=B5=81?= =?UTF-8?q?=E8=B6=85=E6=97=B6=E6=A3=80=E6=B5=8Bbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Rtsp/RtspSession.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Rtsp/RtspSession.cpp b/src/Rtsp/RtspSession.cpp index 5a37fc07..ffc7cc86 100644 --- a/src/Rtsp/RtspSession.cpp +++ b/src/Rtsp/RtspSession.cpp @@ -119,8 +119,9 @@ void RtspSession::onManager() { } } - //组播不检查心跳是否超时 - if (_rtpType == PlayerBase::RTP_UDP && _ticker.elapsedTime() > 15 * 1000) { + + if ((_rtpType == PlayerBase::RTP_UDP || _pushSrc ) && _ticker.elapsedTime() > 15 * 1000) { + //如果是推流端或者rtp over udp类型的播放端,那么就做超时检测 WarnL << "RTSP会话超时:" << get_peer_ip(); shutdown(); return;