rtp服务器单端口模式收到相同ssrc推流时延时关闭RtpSession对象(防止频繁创建销毁对象)

This commit is contained in:
xiongziliang
2023-02-28 22:43:57 +08:00
parent c2e1083493
commit 539d6299f0
4 changed files with 30 additions and 7 deletions

View File

@@ -42,7 +42,7 @@ RtpProcess::Ptr RtpSelector::getProcess(const string &stream_id,bool makeNew) {
}
if (it != _map_rtp_process.end() && makeNew) {
//已经被其他线程持有了,不得再被持有,否则会存在线程安全的问题
throw std::runtime_error(StrPrinter << "RtpProcess(" << stream_id << ") already existed");
throw ProcessExisted(StrPrinter << "RtpProcess(" << stream_id << ") already existed");
}
RtpProcessHelper::Ptr &ref = _map_rtp_process[stream_id];
if (!ref) {