1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00
This commit is contained in:
accest 2024-12-05 16:57:38 +08:00 committed by GitHub
commit 2499a43349
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -53,10 +53,11 @@ void srs_discovery_tc_url(string tcUrl, string& schema, string& host, string& vh
string fullUrl = srs_string_replace(tcUrl, "...vhost...", "?vhost=");
// Standard URL is:
// rtmp://ip/app/app2/stream?k=v
// rtmp://ip/app/app2/stream?k=v
// Where after last slash is stream.
fullUrl += stream.empty() ? "/" : (stream.at(0) == '/' ? stream : "/" + stream);
fullUrl += param.empty() ? "" : (param.at(0) == '?' ? param : "?" + param);
if (fullUrl.find_first_of("?#") == string::npos)
fullUrl += param.empty() ? "" : (param.at(0) == '?' ? param : "?" + param);
// First, we covert the FMLE URL to standard URL:
// rtmp://ip/app/app2?k=v/stream , or: