mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
extracta parse_buffer for config
This commit is contained in:
parent
784d7499cf
commit
1e8981eb08
2 changed files with 16 additions and 2 deletions
|
@ -1161,7 +1161,14 @@ int SrsConfig::parse_file(const char* filename)
|
|||
return ret;
|
||||
}
|
||||
|
||||
if ((ret = root->parse(&buffer)) != ERROR_SUCCESS) {
|
||||
return parse_buffer(&buffer);
|
||||
}
|
||||
|
||||
int SrsConfig::parse_buffer(_srs_internal::SrsConfigBuffer* buffer)
|
||||
{
|
||||
int ret = ERROR_SUCCESS;
|
||||
|
||||
if ((ret = root->parse(buffer)) != ERROR_SUCCESS) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue