修复非法rtp数据导致空指针崩溃问题 (#4226)

This commit is contained in:
xiongguangjie
2025-04-07 20:50:03 +08:00
committed by GitHub
parent 3351aedeee
commit fd4f00dd63

View File

@@ -188,8 +188,14 @@ private:
}
iterator popIterator(iterator it) {
output(it->first, std::move(it->second));
return _pkt_sort_cache_map.erase(it);
try {
output(it->first, std::move(it->second));
return _pkt_sort_cache_map.erase(it);
} catch (...) {
// 防止抛异常未移除迭代器导致rtp包为空
_pkt_sort_cache_map.erase(it);
throw;
}
}
void output(SEQ seq, T packet) {