mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Fix SrsHlsMuxer::segment_close bug, reopen segment when close failed.
This commit is contained in:
parent
d306ee7506
commit
1626942d29
3 changed files with 22 additions and 3 deletions
|
@ -143,9 +143,12 @@ srs_error_t SrsFragment::rename()
|
|||
ss << tempdur;
|
||||
full_path = srs_string_replace(full_path, "[duration]", ss.str());
|
||||
}
|
||||
if (::rename(tmp_file.c_str(), full_path.c_str()) < 0) {
|
||||
|
||||
int r0 = ::rename(tmp_file.c_str(), full_path.c_str());
|
||||
if (r0 < 0) {
|
||||
return srs_error_new(ERROR_SYSTEM_FRAGMENT_RENAME, "rename %s to %s", tmp_file.c_str(), full_path.c_str());
|
||||
}
|
||||
|
||||
filepath = full_path;
|
||||
return err;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue