修复不能立即关闭拉流代理的问题:#559

This commit is contained in:
xiongziliang 2020-11-15 00:00:22 +08:00
parent 3d8f015f5d
commit ebbe124d00

View File

@ -169,10 +169,10 @@ bool PlayerProxy::close(MediaSource &sender,bool force) {
strongSelf->_muxer.reset(); strongSelf->_muxer.reset();
strongSelf->setMediaSource(nullptr); strongSelf->setMediaSource(nullptr);
strongSelf->teardown(); strongSelf->teardown();
if (strongSelf->_on_close) {
strongSelf->_on_close();
}
}); });
if (_on_close) {
_on_close();
}
WarnL << sender.getSchema() << "/" << sender.getVhost() << "/" << sender.getApp() << "/" << sender.getId() << " " << force; WarnL << sender.getSchema() << "/" << sender.getVhost() << "/" << sender.getApp() << "/" << sender.getId() << " " << force;
return true; return true;
} }