确保断连续推功能开启后流能正常强制关闭 (#4287)
Some checks are pending
Android / build (push) Waiting to run
CodeQL / Analyze (cpp) (push) Waiting to run
CodeQL / Analyze (javascript) (push) Waiting to run
Docker / build (push) Waiting to run
Linux / build (push) Waiting to run
macOS / build (push) Waiting to run
Windows / build (push) Waiting to run

This commit is contained in:
xia-chu 2025-06-29 18:09:43 +08:00
parent a35444f27e
commit f0bc7a75aa
2 changed files with 18 additions and 0 deletions

View File

@ -513,6 +513,18 @@ EventPoller::Ptr MultiMediaSourceMuxer::getOwnerPoller(MediaSource &sender) {
}
}
bool MultiMediaSourceMuxer::close(MediaSource &sender) {
_rtmp = nullptr;
_rtsp = nullptr;
_fmp4 = nullptr;
_ts = nullptr;
_mp4 = nullptr;
_hls = nullptr;
_hls_fmp4 = nullptr;
_rtp_sender.clear();
return true;
}
std::shared_ptr<MultiMediaSourceMuxer> MultiMediaSourceMuxer::getMuxer(MediaSource &sender) const {
return const_cast<MultiMediaSourceMuxer*>(this)->shared_from_this();
}

View File

@ -182,6 +182,12 @@ public:
*/
toolkit::EventPoller::Ptr getOwnerPoller(MediaSource &sender) override;
/**
*
* @return
*/
bool close(MediaSource &sender) override;
/**
*
* Get this object