diff --git a/trunk/conf/hls.conf b/trunk/conf/hls.conf index 0bbf13ad51..0263b7ea73 100644 --- a/trunk/conf/hls.conf +++ b/trunk/conf/hls.conf @@ -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; } } diff --git a/trunk/src/app/srs_app_config.cpp b/trunk/src/app/srs_app_config.cpp index a5207afc46..a66a772584 100644 --- a/trunk/src/app/srs_app_config.cpp +++ b/trunk/src/app/srs_app_config.cpp @@ -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)