确保rtp推流线程安全性

This commit is contained in:
xiongziliang
2022-10-30 21:36:35 +08:00
parent 80eb6dc402
commit 9498b96b95
6 changed files with 25 additions and 48 deletions

View File

@@ -400,7 +400,7 @@ uint16_t openRtpServer(uint16_t local_port, const string &stream_id, int tcp_mod
//设置rtp超时移除事件
lock_guard<recursive_mutex> lck(s_rtpServerMapMtx);
s_rtpServerMap.erase(stream_id);
});
});
//保存对象
s_rtpServerMap.emplace(stream_id, server);