兼容旷世智能分析系统RTSP拉流兼容性问题

旷世智能分析系统(User-Agent显示为LIVE555 Streaming Media v2017.07.18)RTSP拉流,
DESCRIBE URL中包含账号密码,而当SDP的control没有完整的URL只有trackID时,SETUP
会报错"no such track with control url"。

修复:
在RtspSession::onWholeRtspPacket()方法中使用RtspUrl._url初始化_content_base。
This commit is contained in:
Nashira 2023-11-29 14:58:00 +08:00
parent e81ff307c7
commit f2f59e45c1
No known key found for this signature in database
GPG Key ID: 598EE12B8A071CD4
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;
}