From 15d6458b854ec2f02058b2a82d5e19b22c870420 Mon Sep 17 00:00:00 2001 From: zx <2200013083@stu.pku.edu.cn> Date: Thu, 10 Oct 2024 19:04:26 +0800 Subject: [PATCH] check for param should not cover the append of stream --- trunk/src/protocol/srs_protocol_utility.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/trunk/src/protocol/srs_protocol_utility.cpp b/trunk/src/protocol/srs_protocol_utility.cpp index cc26249dd..46c13e554 100644 --- a/trunk/src/protocol/srs_protocol_utility.cpp +++ b/trunk/src/protocol/srs_protocol_utility.cpp @@ -55,11 +55,9 @@ void srs_discovery_tc_url(string tcUrl, string& schema, string& host, string& vh // Standard URL is: // rtmp://ip/app/app2/stream?k=v // Where after last slash is stream. + fullUrl += stream.empty() ? "/" : (stream.at(0) == '/' ? stream : "/" + stream); if (fullUrl.find_first_of("?#") == string::npos) - { fullUrl += param.empty() ? "" : (param.at(0) == '?' ? param : "?" + param); - fullUrl += stream.empty() ? "/" : (stream.at(0) == '/' ? stream : "/" + stream); - } // First, we covert the FMLE URL to standard URL: // rtmp://ip/app/app2?k=v/stream , or: