mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 19:00:01 +08:00
rtsp播放器在udp情况下超时时间延长4倍(防止vlc超时)
This commit is contained in:
parent
98dc9bc78e
commit
55c2b08c57
@ -99,11 +99,16 @@ void RtspSession::onManager() {
|
||||
}
|
||||
}
|
||||
|
||||
if ((_rtp_type == Rtsp::RTP_UDP || _push_src ) && _alive_ticker.elapsedTime() > keep_alive_sec * 1000 && _enable_send_rtp) {
|
||||
//如果是推流端或者rtp over udp类型的播放端,那么就做超时检测
|
||||
shutdown(SockException(Err_timeout,"rtp over udp session timeouted"));
|
||||
if (_push_src && _alive_ticker.elapsedTime() > keep_alive_sec * 1000) {
|
||||
//推流超时
|
||||
shutdown(SockException(Err_timeout, "pusher session timeouted"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_push_src && _rtp_type == Rtsp::RTP_UDP && _enable_send_rtp && _alive_ticker.elapsedTime() > keep_alive_sec * 4000) {
|
||||
//rtp over udp播放器超时
|
||||
shutdown(SockException(Err_timeout, "rtp over udp player timeouted"));
|
||||
}
|
||||
}
|
||||
|
||||
void RtspSession::onRecv(const Buffer::Ptr &buf) {
|
||||
|
Loading…
Reference in New Issue
Block a user