mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
for #340, refine ts prefix code.
This commit is contained in:
parent
5969f72354
commit
65f404fb42
2 changed files with 6 additions and 7 deletions
|
@ -9,7 +9,6 @@ vhost __defaultVhost__ {
|
|||
enabled on;
|
||||
hls_fragment 10;
|
||||
hls_window 60;
|
||||
# hls_entry_prefix http://127.0.0.1/;
|
||||
hls_path ./objs/nginx/html;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3152,17 +3152,17 @@ string SrsConfig::get_hls_entry_prefix(string vhost)
|
|||
return "";
|
||||
}
|
||||
|
||||
std::string hls_entry_prefix = conf->arg0();
|
||||
if (hls_entry_prefix.empty()) {
|
||||
std::string prefix = conf->arg0();
|
||||
if (prefix.empty()) {
|
||||
return "";
|
||||
}
|
||||
|
||||
char last_char = hls_entry_prefix[hls_entry_prefix.length() - 1];
|
||||
if (last_char != '/') {
|
||||
hls_entry_prefix.append("/");
|
||||
const char last = prefix[prefix.length() - 1];
|
||||
if (last != '/') {
|
||||
return prefix.append("/");
|
||||
}
|
||||
|
||||
return hls_entry_prefix;
|
||||
return prefix;
|
||||
}
|
||||
|
||||
string SrsConfig::get_hls_path(string vhost)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue