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

fix bug of get hls enabled config

This commit is contained in:
winlin 2013-12-15 13:23:03 +08:00
parent 3ad692bf97
commit b3ef28f831
3 changed files with 14 additions and 10 deletions

View file

@ -1312,11 +1312,17 @@ bool SrsConfig::get_hls_enabled(string vhost)
return false;
}
if (hls->arg0() == "off") {
SrsConfDirective* conf = hls->get("enabled");
if (!conf) {
return false;
}
return true;
if (conf->arg0() == "on") {
return true;
}
return false;
}
string SrsConfig::get_hls_path(string vhost)

View file

@ -1148,7 +1148,6 @@ int SrsHls::on_publish(SrsRequest* req)
std::string stream = req->stream;
std::string app = req->app;
// TODO: support reload.
if (!config->get_hls_enabled(vhost)) {
return ret;
}
@ -1156,7 +1155,6 @@ int SrsHls::on_publish(SrsRequest* req)
// if enabled, open the muxer.
hls_enabled = true;
// TODO: subscribe the reload event.
int hls_fragment = config->get_hls_fragment(vhost);
int hls_window = config->get_hls_window(vhost);