Fix hls fmp4 clear cache bug (#3355)

Fix hls fmp4 clear cache delete init.mp4 result in play failed for #3348
This commit is contained in:
xiongguangjie 2024-03-08 11:04:59 +08:00 committed by GitHub
parent 79b2aa6adc
commit fe61b572e0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -72,7 +72,7 @@ void HlsMakerImp::clearCache(bool immediately, bool eof) {
std::list<std::string> lst; std::list<std::string> lst;
lst.emplace_back(_path_hls); lst.emplace_back(_path_hls);
lst.emplace_back(_path_hls_delay); lst.emplace_back(_path_hls_delay);
if (!_path_init.empty()) { if (!_path_init.empty() && eof) {
lst.emplace_back(_path_init); lst.emplace_back(_path_init);
} }
for (auto &pr : _segment_file_paths) { for (auto &pr : _segment_file_paths) {