mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-13 19:51:49 +08:00
HLS: 修复hls直播ts/m3u8文件更新导致mmap失效,触发bus error的bug
This commit is contained in:
@@ -132,8 +132,10 @@ void HlsMaker::flushLastSegment(bool eof){
|
||||
_seg_dur_list.push_back(std::make_tuple(seg_dur, std::move(_last_file_name)));
|
||||
_last_file_name.clear();
|
||||
delOldSegment();
|
||||
makeIndexFile(eof);
|
||||
//先flush ts切片,否则可能存在ts文件未写入完毕就被访问的情况
|
||||
onFlushLastSegment(seg_dur);
|
||||
//然后写m3u8文件
|
||||
makeIndexFile(eof);
|
||||
}
|
||||
|
||||
bool HlsMaker::isLive() {
|
||||
|
||||
Reference in New Issue
Block a user