From ff70ef233cf371ed0092b579521acb9866c3e1bf Mon Sep 17 00:00:00 2001 From: xia-chu <771730766@qq.com> Date: Sat, 20 Apr 2024 20:00:25 +0800 Subject: [PATCH] Fix bug where ts files are not written into m3u8 file during HLS playback. --- src/Record/HlsMaker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Record/HlsMaker.cpp b/src/Record/HlsMaker.cpp index 11d5190a..bc11028f 100644 --- a/src/Record/HlsMaker.cpp +++ b/src/Record/HlsMaker.cpp @@ -28,7 +28,7 @@ void HlsMaker::makeIndexFile(bool include_delay, bool eof) { GET_CONFIG(uint32_t, segDelay, Hls::kSegmentDelay); GET_CONFIG(uint32_t, segRetain, Hls::kSegmentRetain); std::deque> temp(_seg_dur_list); - if (!include_delay) { + if (!include_delay && _seg_number) { while (temp.size() > _seg_number) { temp.pop_front(); }