From 6078ca3e81f096a3427fb3f0cb876f1cfd64785d Mon Sep 17 00:00:00 2001 From: ziyue <1213642868@qq.com> Date: Thu, 2 Feb 2023 11:21:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dhls=E6=B3=A8=E5=86=8C?= =?UTF-8?q?=E6=8A=9B=E5=BC=82=E5=B8=B8=E5=8F=AF=E8=83=BD=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Record/HlsMakerImp.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Record/HlsMakerImp.cpp b/src/Record/HlsMakerImp.cpp index d4061a60..865561b7 100644 --- a/src/Record/HlsMakerImp.cpp +++ b/src/Record/HlsMakerImp.cpp @@ -40,7 +40,12 @@ HlsMakerImp::HlsMakerImp(const string &m3u8_file, } HlsMakerImp::~HlsMakerImp() { - clearCache(false, true); + try { + // 可能hls注册时导致抛异常 + clearCache(false, true); + } catch (std::exception &ex) { + WarnL << ex.what(); + } } void HlsMakerImp::clearCache() {