From 1136bf4a00ca3814658f24b86e120cda8d8de8b0 Mon Sep 17 00:00:00 2001 From: Nashira Date: Wed, 29 Nov 2023 15:48:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E7=9B=B8=E5=AF=B9=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E6=88=B3=E9=80=BB=E8=BE=91,=20=E5=AE=8C=E5=96=84?= =?UTF-8?q?=E5=90=8C=E6=AD=A5=E6=9C=BA=E5=88=B6,=20=E8=A7=A3=E5=86=B3?= =?UTF-8?q?=E7=9B=B8=E5=AF=B9=E6=97=B6=E9=97=B4=E6=88=B3=E4=B8=8D=E5=90=8C?= =?UTF-8?q?=E6=AD=A5=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 默认禁止时间戳回退并设置最大跳跃幅度为300毫秒 rtsp恢复产生ntp时间戳 由于绝对时间戳可能跳跃回退,之前在求相对时间戳时会导致音视频不同步。 现在求相对时间戳逻辑经过修改,已经支持同步功能,所以恢复rtp ntp时间戳逻辑 Signed-off-by: Nashira --- src/Rtsp/RtspSession.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Rtsp/RtspSession.cpp b/src/Rtsp/RtspSession.cpp index 5e8e85ea..e32f7395 100644 --- a/src/Rtsp/RtspSession.cpp +++ b/src/Rtsp/RtspSession.cpp @@ -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; }