mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-30 14:52:23 +08:00
使用static_pointer_cast优化性能
This commit is contained in:
@@ -68,7 +68,7 @@ HlsMediaSource::Ptr HlsCookieData::getMediaSource() const {
|
||||
void HlsMediaSource::setIndexFile(std::string index_file)
|
||||
{
|
||||
if (!_ring) {
|
||||
std::weak_ptr<HlsMediaSource> weakSelf = std::dynamic_pointer_cast<HlsMediaSource>(shared_from_this());
|
||||
std::weak_ptr<HlsMediaSource> weakSelf = std::static_pointer_cast<HlsMediaSource>(shared_from_this());
|
||||
auto lam = [weakSelf](int size) {
|
||||
auto strongSelf = weakSelf.lock();
|
||||
if (!strongSelf) {
|
||||
|
||||
Reference in New Issue
Block a user