diff --git a/src/Player/PlayerBase.cpp b/src/Player/PlayerBase.cpp index abaa1311..9cc18f98 100644 --- a/src/Player/PlayerBase.cpp +++ b/src/Player/PlayerBase.cpp @@ -24,7 +24,7 @@ namespace mediakit { PlayerBase::Ptr PlayerBase::createPlayer(const EventPoller::Ptr &in_poller, const string &url_in) { auto poller = in_poller ? in_poller : EventPollerPool::Instance().getPoller(); std::weak_ptr weak_poller = poller; - static auto release_func = [weak_poller](PlayerBase *ptr) { + auto release_func = [weak_poller](PlayerBase *ptr) { if (auto poller = weak_poller.lock()) { poller->async([ptr]() { onceToken token(nullptr, [&]() { delete ptr; });