From 962dca081c32cf0c7ea243b3efcde5c7c61f00af Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Sun, 5 May 2019 12:06:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E9=AB=98rtsp=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E7=AB=AF=E5=85=BC=E5=AE=B9=E6=80=A7=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Rtsp/RtspPlayer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Rtsp/RtspPlayer.cpp b/src/Rtsp/RtspPlayer.cpp index 7db6cd24..38b38711 100644 --- a/src/Rtsp/RtspPlayer.cpp +++ b/src/Rtsp/RtspPlayer.cpp @@ -342,7 +342,9 @@ void RtspPlayer::handleResSETUP(const Parser &parser, unsigned int uiTrackIndex) }); } /////////////////////////心跳///////////////////////////////// - if(_eType != Rtsp::RTP_TCP){ + //有些设备在rtp over tcp的情况下也需要定时发送心跳包(比较坑爹) + //if(_eType != Rtsp::RTP_TCP) + { weak_ptr weakSelf = dynamic_pointer_cast(shared_from_this()); _pBeatTimer.reset(new Timer((*this)[kBeatIntervalMS].as() / 1000.0, [weakSelf](){ auto strongSelf = weakSelf.lock();