完善相对时间戳逻辑, 完善同步机制, 解决相对时间戳不同步的问题

默认禁止时间戳回退并设置最大跳跃幅度为300毫秒
rtsp恢复产生ntp时间戳
由于绝对时间戳可能跳跃回退,之前在求相对时间戳时会导致音视频不同步。
现在求相对时间戳逻辑经过修改,已经支持同步功能,所以恢复rtp ntp时间戳逻辑

Signed-off-by: Nashira <nashira@nashira.cn>
This commit is contained in:
Nashira 2023-11-29 15:48:37 +08:00
parent e81ff307c7
commit 1136bf4a00
No known key found for this signature in database
GPG Key ID: B7777130D9D80D35
1 changed files with 3 additions and 1 deletions

View File

@ -131,7 +131,9 @@ void RtspSession::onWholeRtspPacket(Parser &parser) {
string method = parser.method(); //提取出请求命令字
_cseq = atoi(parser["CSeq"].data());
if (_content_base.empty() && method != "GET") {
_content_base = parser.url();
RtspUrl rtsp = RtspUrl();
rtsp.parse(parser.url());
_content_base = rtsp._url;
_media_info.parse(parser.fullUrl());
_media_info.schema = RTSP_SCHEMA;
}