1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

SRT: Decouple publish with play url (#2893). v4.0.251

This commit is contained in:
winlin 2022-03-19 12:06:07 +08:00
parent 41e35155f7
commit 76ed0200b4
6 changed files with 29 additions and 14 deletions

View file

@ -219,6 +219,17 @@ std::string srt_conn::get_streamid() {
return _streamid;
}
std::string srt_conn::get_path() {
if (!_url_path.empty()) {
return _url_path;
}
size_t pos = _url_subpath.find("?");
_url_path = (pos != std::string::npos) ? _url_subpath.substr(0, pos) : _url_subpath;
return _url_path;
}
std::string srt_conn::get_subpath() {
return _url_subpath;
}