From fe61b572e0c95fff4261902d76cb3b8bcbcc2114 Mon Sep 17 00:00:00 2001 From: xiongguangjie Date: Fri, 8 Mar 2024 11:04:59 +0800 Subject: [PATCH] Fix hls fmp4 clear cache bug (#3355) Fix hls fmp4 clear cache delete init.mp4 result in play failed for #3348 --- src/Record/HlsMakerImp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Record/HlsMakerImp.cpp b/src/Record/HlsMakerImp.cpp index e987f820..d62c4398 100644 --- a/src/Record/HlsMakerImp.cpp +++ b/src/Record/HlsMakerImp.cpp @@ -72,7 +72,7 @@ void HlsMakerImp::clearCache(bool immediately, bool eof) { std::list lst; lst.emplace_back(_path_hls); lst.emplace_back(_path_hls_delay); - if (!_path_init.empty()) { + if (!_path_init.empty() && eof) { lst.emplace_back(_path_init); } for (auto &pr : _segment_file_paths) {