mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
For #1672, fix dvr close file failed bug. 3.0.140
This commit is contained in:
parent
cd1513d6a3
commit
57604a9c65
5 changed files with 8 additions and 7 deletions
|
@ -179,13 +179,12 @@ srs_error_t SrsDvrSegmenter::close()
|
|||
}
|
||||
|
||||
// Close the encoder, then close the fs object.
|
||||
if ((err = close_encoder()) != srs_success) {
|
||||
fs->close();
|
||||
err = close_encoder();
|
||||
fs->close(); // Always close the file.
|
||||
if (err != srs_success) {
|
||||
return srs_error_wrap(err, "close encoder");
|
||||
}
|
||||
|
||||
fs->close();
|
||||
|
||||
// when tmp flv file exists, reap it.
|
||||
if ((err = fragment->rename()) != srs_success) {
|
||||
return srs_error_wrap(err, "rename fragment");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue