RtcSsrc解析时重复插入返回失败说明对象重复

This commit is contained in:
blueskiner 2023-12-01 09:46:13 +08:00
parent 721492be9d
commit b1fa9e3000
1 changed files with 1 additions and 2 deletions

View File

@ -274,10 +274,9 @@ void RtcSessionSdp::parse(const string &str) {
continue;
}
if (line_set.find(line) != line_set.end()) {
if (!line_set.emplace(line).second) {
continue;
}
line_set.emplace(line);
auto key = line.substr(0, 1);
auto value = line.substr(2);