mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
parse ffmpeg params
This commit is contained in:
parent
ce15f4bce3
commit
80a81b1661
12 changed files with 704 additions and 18 deletions
|
@ -43,3 +43,20 @@ void srs_update_system_time_ms()
|
|||
|
||||
_srs_system_time_us_cache = srs_max(0, _srs_system_time_us_cache);
|
||||
}
|
||||
|
||||
std::string srs_replace(std::string str, std::string old_str, std::string new_str)
|
||||
{
|
||||
std::string ret = str;
|
||||
|
||||
if (old_str == new_str) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
size_t pos = 0;
|
||||
while ((pos = ret.find(old_str, pos)) != std::string::npos) {
|
||||
ret = ret.replace(pos, old_str.length(), new_str);
|
||||
pos += new_str.length();
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue