mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 19:00:01 +08:00
BugFix: crashes when exceptions are thrown during destruction #3402
This commit is contained in:
parent
66a6253160
commit
5036aa5ec5
@ -29,7 +29,13 @@ public:
|
||||
getRtmpRing()->setDelegate(_media_src);
|
||||
}
|
||||
|
||||
~RtmpMediaSourceMuxer() override { RtmpMuxer::flush(); }
|
||||
~RtmpMediaSourceMuxer() override {
|
||||
try {
|
||||
RtmpMuxer::flush();
|
||||
} catch (std::exception &ex) {
|
||||
WarnL << ex.what();
|
||||
}
|
||||
}
|
||||
|
||||
void setListener(const std::weak_ptr<MediaSourceEvent> &listener){
|
||||
setDelegate(listener);
|
||||
|
Loading…
Reference in New Issue
Block a user