Refine code

pull/2521/head
winlin 4 years ago
parent ee376da0c6
commit 92cbb1f072

@ -75,13 +75,15 @@ void srs_build_features(stringstream& ss)
SrsConfDirective* conf = root->at(i);
if (!rtsp && conf->is_stream_caster() && _srs_config->get_stream_caster_enabled(conf)) {
if (_srs_config->get_stream_caster_engine(conf) == "rtsp") {
string engine = _srs_config->get_stream_caster_engine(conf);
if (engine == "rtsp") {
rtsp = true;
}
}
if (conf->is_vhost() && _srs_config->get_vhost_enabled(conf)) {
nn_vhosts++;
if (!forward && _srs_config->get_forward_enabled(conf)) {
forward = true;
}
@ -113,14 +115,19 @@ void srs_build_features(stringstream& ss)
security = true;
}
for (int j = 0; j < (int)conf->directives.size(); j++) {
for (int j = 0; j < (int)conf->directives.size() && j < 64; j++) {
SrsConfDirective* prop = conf->directives.at(j);
if (!ingest && prop->name == "ingest" && _srs_config->get_ingest_enabled(prop)) {
ingest = true;
}
if (!transcode && prop->name == "transcode" && _srs_config->get_transcode_enabled(prop)) {
transcode = true;
}
if (ingest && transcode) {
break;
}
}
}
}

Loading…
Cancel
Save