mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
fix #474, config to donot parse width/height from sps. 2.0.189
This commit is contained in:
parent
eb578b4a39
commit
511627abab
10 changed files with 94 additions and 11 deletions
|
@ -618,6 +618,9 @@ int SrsConfig::reload_vhost(SrsConfDirective* old_root)
|
|||
srs_error("reload never supports mode changed. ret=%d", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
// the auto reload configs:
|
||||
// publish.parse_sps
|
||||
|
||||
// ENABLED => ENABLED (modified)
|
||||
if (get_vhost_enabled(new_vhost) && get_vhost_enabled(old_vhost)) {
|
||||
|
@ -1806,7 +1809,7 @@ int SrsConfig::check_config()
|
|||
&& n != "time_jitter" && n != "mix_correct"
|
||||
&& n != "atc" && n != "atc_auto"
|
||||
&& n != "debug_srs_upnode"
|
||||
&& n != "mr" && n != "mw_latency" && n != "min_latency"
|
||||
&& n != "mr" && n != "mw_latency" && n != "min_latency" && n != "publish"
|
||||
&& n != "tcp_nodelay" && n != "send_min_interval" && n != "reduce_sequence_header"
|
||||
&& n != "publish_1stpkt_timeout" && n != "publish_normal_timeout"
|
||||
&& n != "security" && n != "http_remux"
|
||||
|
@ -1839,6 +1842,16 @@ int SrsConfig::check_config()
|
|||
return ret;
|
||||
}
|
||||
}
|
||||
} else if (n == "publish") {
|
||||
for (int j = 0; j < (int)conf->directives.size(); j++) {
|
||||
string m = conf->at(j)->name.c_str();
|
||||
if (m != "parse_sps"
|
||||
) {
|
||||
ret = ERROR_SYSTEM_CONFIG_INVALID;
|
||||
srs_error("unsupported vhost publish directive %s, ret=%d", m.c_str(), ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
} else if (n == "ingest") {
|
||||
for (int j = 0; j < (int)conf->directives.size(); j++) {
|
||||
string m = conf->at(j)->name.c_str();
|
||||
|
@ -2473,6 +2486,29 @@ int SrsConfig::get_chunk_size(string vhost)
|
|||
return ::atoi(conf->arg0().c_str());
|
||||
}
|
||||
|
||||
bool SrsConfig::get_parse_sps(string vhost)
|
||||
{
|
||||
static bool DEFAULT = true;
|
||||
|
||||
SrsConfDirective* conf = get_vhost(vhost);
|
||||
|
||||
if (!conf) {
|
||||
return DEFAULT;
|
||||
}
|
||||
|
||||
conf = conf->get("publish");
|
||||
if (!conf) {
|
||||
return DEFAULT;
|
||||
}
|
||||
|
||||
conf = conf->get("parse_sps");
|
||||
if (!conf || conf->arg0().empty()) {
|
||||
return DEFAULT;
|
||||
}
|
||||
|
||||
return SRS_CONF_PERFER_TRUE(conf->arg0());
|
||||
}
|
||||
|
||||
bool SrsConfig::get_mr_enabled(string vhost)
|
||||
{
|
||||
SrsConfDirective* conf = get_vhost(vhost);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue