diff --git a/trunk/src/protocol/srs_protocol_utility.cpp b/trunk/src/protocol/srs_protocol_utility.cpp index 620ebfea4..46c13e554 100644 --- a/trunk/src/protocol/srs_protocol_utility.cpp +++ b/trunk/src/protocol/srs_protocol_utility.cpp @@ -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: