修复当源析构时组播对象偶现析构不了的问题
This commit is contained in:
parent
4cd735f61d
commit
c40aa6d031
|
|
@ -144,7 +144,16 @@ RtpMultiCaster::RtpMultiCaster(SocketHelper &helper, const string &local_ip, con
|
|||
});
|
||||
});
|
||||
|
||||
string strKey = StrPrinter << local_ip << " " << vhost << " " << app << " " << stream << endl;
|
||||
_rtp_reader->setDetachCB([this]() {
|
||||
{
|
||||
lock_guard<recursive_mutex> lck(g_mtx);
|
||||
auto it = g_multi_caster_map.find(strKey);
|
||||
if (it != g_multi_caster_map.end()) {
|
||||
g_multi_caster_map.erase(it);
|
||||
}
|
||||
}
|
||||
|
||||
unordered_map<void *, onDetach> _detach_map_copy;
|
||||
{
|
||||
lock_guard<recursive_mutex> lck(_mtx);
|
||||
|
|
|
|||
Loading…
Reference in New Issue