Skip to content

Commit

Permalink
for ossrs#340, refine ts prefix code.
Browse files Browse the repository at this point in the history
  • Loading branch information
wenjie.zhao committed Mar 12, 2015
1 parent 5969f72 commit 65f404f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
1 change: 0 additions & 1 deletion trunk/conf/hls.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
12 changes: 6 additions & 6 deletions trunk/src/app/srs_app_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 65f404f

Please sign in to comment.