mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-16 04:55:58 +08:00
大幅优化性能
This commit is contained in:
@@ -192,13 +192,16 @@ void PlayerProxy::initMedia() {
|
||||
bool PlayerProxy::shutDown() {
|
||||
//通知其停止推流
|
||||
weak_ptr<PlayerProxy> weakSlef = dynamic_pointer_cast<PlayerProxy>(shared_from_this());
|
||||
ASYNC_TRACE([weakSlef](){
|
||||
auto stronSelf = weakSlef.lock();
|
||||
if(stronSelf){
|
||||
stronSelf->m_pChn.reset();
|
||||
stronSelf->teardown();
|
||||
}
|
||||
});
|
||||
auto executor = getExecutor();
|
||||
if(executor) {
|
||||
executor->async_first([weakSlef]() {
|
||||
auto stronSelf = weakSlef.lock();
|
||||
if (stronSelf) {
|
||||
stronSelf->m_pChn.reset();
|
||||
stronSelf->teardown();
|
||||
}
|
||||
});
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user