mirror of
https://gitee.com/xia-chu/ZLMediaKit.git
synced 2026-05-06 10:57:50 +08:00
修复非法rtp数据导致空指针崩溃问题 (#4226)
Some checks failed
Android / build (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
Docker / build (push) Has been cancelled
Linux / build (push) Has been cancelled
macOS / build (push) Has been cancelled
Windows / build (push) Has been cancelled
Some checks failed
Android / build (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
Docker / build (push) Has been cancelled
Linux / build (push) Has been cancelled
macOS / build (push) Has been cancelled
Windows / build (push) Has been cancelled
This commit is contained in:
parent
3351aedeee
commit
fd4f00dd63
@ -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) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user