修复指针转换偏移量导致的bug
This commit is contained in:
parent
be9e31bba2
commit
cf599167c1
|
|
@ -264,14 +264,14 @@ public:
|
||||||
void addDelegate(const FrameWriterInterface::Ptr &delegate){
|
void addDelegate(const FrameWriterInterface::Ptr &delegate){
|
||||||
//_delegates_write可能多线程同时操作
|
//_delegates_write可能多线程同时操作
|
||||||
lock_guard<mutex> lck(_mtx);
|
lock_guard<mutex> lck(_mtx);
|
||||||
_delegates_write.emplace((void *)delegate.get(),delegate);
|
_delegates_write.emplace(delegate.get(),delegate);
|
||||||
_need_update = true;
|
_need_update = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除代理
|
* 删除代理
|
||||||
*/
|
*/
|
||||||
void delDelegate(void *ptr){
|
void delDelegate(FrameWriterInterface *ptr){
|
||||||
//_delegates_write可能多线程同时操作
|
//_delegates_write可能多线程同时操作
|
||||||
lock_guard<mutex> lck(_mtx);
|
lock_guard<mutex> lck(_mtx);
|
||||||
_delegates_write.erase(ptr);
|
_delegates_write.erase(ptr);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue