修复whip delete_webrtc未注销流 (#2688)

bug触发条件:
1、obs whip 推流到zlm
2、关闭推流
3、zlm 未注销流
This commit is contained in:
Dw9 2023-07-22 10:46:17 +08:00 committed by GitHub
parent 19d6f1a003
commit eb382c3fc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 3 deletions

View File

@ -163,4 +163,9 @@ void WebRtcPusher::onRtcpBye(){
WebRtcTransportImp::onRtcpBye();
}
void WebRtcPusher::onShutdown(const SockException &ex) {
_push_src = nullptr;
WebRtcTransportImp::onShutdown(ex);
}
}// namespace mediakit

View File

@ -23,12 +23,14 @@ public:
static Ptr create(const EventPoller::Ptr &poller, const RtspMediaSource::Ptr &src,
const std::shared_ptr<void> &ownership, const MediaInfo &info, const ProtocolOption &option, bool preferred_tcp = false);
protected:
///////WebRtcTransportImp override///////
void onStartWebRTC() override;
void onDestory() override;
void onRtcConfigure(RtcConfigure &configure) const override;
void onRecvRtp(MediaTrack &track, const std::string &rid, RtpPacket::Ptr rtp) override;
void onShutdown(const SockException &ex) override;
void onRtcpBye() override;
//// dtls相关的回调 ////
void OnDtlsTransportClosed(const RTC::DtlsTransport *dtlsTransport) override;