mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-07-06 03:28:09 +08:00
Merge branch 'master' of https://gitee.com/xia-chu/ZLMediaKit into dev
This commit is contained in:
@@ -61,7 +61,7 @@ bool RtpReceiver::handleOneRtp(int index, TrackType type, int sample_rate, uint8
|
||||
_ssrc_alive[index].resetTime();
|
||||
} else {
|
||||
//ssrc错误
|
||||
if (_ssrc_alive[index].elapsedTime() < 10 * 1000) {
|
||||
if (_ssrc_alive[index].elapsedTime() < 3 * 1000) {
|
||||
//接受正确ssrc的rtp在10秒内,那么我们认为存在多路rtp,忽略掉ssrc不匹配的rtp
|
||||
WarnL << "ssrc不匹配,rtp已丢弃:" << ssrc << " != " << _ssrc[index];
|
||||
return false;
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user