Fix bug where ts files are not written into m3u8 file during HLS playback.

This commit is contained in:
xia-chu 2024-04-20 20:00:25 +08:00
parent 4aa330ab82
commit ff70ef233c

View File

@ -28,7 +28,7 @@ void HlsMaker::makeIndexFile(bool include_delay, bool eof) {
GET_CONFIG(uint32_t, segDelay, Hls::kSegmentDelay); GET_CONFIG(uint32_t, segDelay, Hls::kSegmentDelay);
GET_CONFIG(uint32_t, segRetain, Hls::kSegmentRetain); GET_CONFIG(uint32_t, segRetain, Hls::kSegmentRetain);
std::deque<std::tuple<int, std::string>> temp(_seg_dur_list); std::deque<std::tuple<int, std::string>> temp(_seg_dur_list);
if (!include_delay) { if (!include_delay && _seg_number) {
while (temp.size() > _seg_number) { while (temp.size() > _seg_number) {
temp.pop_front(); temp.pop_front();
} }