mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-07-05 10:58:11 +08:00
防止析构函数抛异常导致崩溃问题 (#2546)
This commit is contained in:
@@ -22,9 +22,7 @@ HlsMaker::HlsMaker(float seg_duration, uint32_t seg_number, bool seg_keep) {
|
||||
_seg_keep = seg_keep;
|
||||
}
|
||||
|
||||
HlsMaker::~HlsMaker() {
|
||||
}
|
||||
|
||||
HlsMaker::~HlsMaker() = default;
|
||||
|
||||
void HlsMaker::makeIndexFile(bool eof) {
|
||||
char file_content[1024];
|
||||
|
||||
@@ -46,7 +46,11 @@ HlsCookieData::~HlsCookieData() {
|
||||
GET_CONFIG(uint32_t, iFlowThreshold, General::kFlowThreshold);
|
||||
uint64_t bytes = _bytes.load();
|
||||
if (bytes >= iFlowThreshold * 1024) {
|
||||
NoticeCenter::Instance().emitEvent(Broadcast::kBroadcastFlowReport, _info, bytes, duration, true, static_cast<SockInfo &>(*_sock_info));
|
||||
try {
|
||||
NoticeCenter::Instance().emitEvent(Broadcast::kBroadcastFlowReport, _info, bytes, duration, true, static_cast<SockInfo &>(*_sock_info));
|
||||
} catch (std::exception &ex) {
|
||||
WarnL << "Exception occurred: " << ex.what();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ using namespace std;
|
||||
|
||||
namespace mediakit {
|
||||
|
||||
MP4Demuxer::MP4Demuxer() {}
|
||||
MP4Demuxer::MP4Demuxer() = default;
|
||||
|
||||
MP4Demuxer::~MP4Demuxer() {
|
||||
closeMP4();
|
||||
|
||||
Reference in New Issue
Block a user