diff --git a/src/Http/HlsPlayer.cpp b/src/Http/HlsPlayer.cpp index e7af45e4..5a2a7a36 100644 --- a/src/Http/HlsPlayer.cpp +++ b/src/Http/HlsPlayer.cpp @@ -383,7 +383,8 @@ void HlsPlayerImp::onShutdown(const SockException &ex) { static_pointer_cast(_demuxer)->pushTask([weak_self, ex]() { auto strong_self = weak_self.lock(); if (strong_self) { - strong_self->PlayerImp::onShutdown(ex); + strong_self->_demuxer = nullptr; + strong_self->onShutdown(ex); } }); } else { diff --git a/src/Http/TsplayerImp.cpp b/src/Http/TsplayerImp.cpp index ae988637..b906600c 100644 --- a/src/Http/TsplayerImp.cpp +++ b/src/Http/TsplayerImp.cpp @@ -50,7 +50,8 @@ void TsPlayerImp::onShutdown(const SockException &ex) { static_pointer_cast(_demuxer)->pushTask([weak_self, ex]() { auto strong_self = weak_self.lock(); if (strong_self) { - strong_self->PlayerImp::onShutdown(ex); + strong_self->_demuxer = nullptr; + strong_self->onShutdown(ex); } }); } else {