1
0
Fork 0
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:
wenjie.zhao 2015-03-13 01:32:51 +08:00
parent 10da182853
commit 5969f72354
5 changed files with 22 additions and 5 deletions

View file

@ -3152,7 +3152,17 @@ string SrsConfig::get_hls_entry_prefix(string vhost)
return "";
}
return conf->arg0();
std::string hls_entry_prefix = conf->arg0();
if (hls_entry_prefix.empty()) {
return "";
}
char last_char = hls_entry_prefix[hls_entry_prefix.length() - 1];
if (last_char != '/') {
hls_entry_prefix.append("/");
}
return hls_entry_prefix;
}
string SrsConfig::get_hls_path(string vhost)