mirror of
https://github.com/ossrs/srs.git
synced 2025-02-13 11:51:57 +00:00
refine dvr, donot append the flv header.
This commit is contained in:
parent
a984eeecab
commit
3d225e1bc7
1 changed files with 6 additions and 3 deletions
|
@ -383,7 +383,7 @@ int SrsDvrPlan::flv_open(string stream, string path)
|
||||||
srs_error("append file stream for file %s failed. ret=%d", path.c_str(), ret);
|
srs_error("append file stream for file %s failed. ret=%d", path.c_str(), ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
srs_warn("dvr: always append to when exists, file=%s.", path.c_str());
|
srs_trace("dvr: always append to when exists, file=%s.", path.c_str());
|
||||||
} else {
|
} else {
|
||||||
if ((ret = fs->open(tmp_flv_file)) != ERROR_SUCCESS) {
|
if ((ret = fs->open(tmp_flv_file)) != ERROR_SUCCESS) {
|
||||||
srs_error("open file stream for file %s failed. ret=%d", path.c_str(), ret);
|
srs_error("open file stream for file %s failed. ret=%d", path.c_str(), ret);
|
||||||
|
@ -396,9 +396,12 @@ int SrsDvrPlan::flv_open(string stream, string path)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// when exists, donot write flv header.
|
||||||
|
if (tmp_flv_file != path) {
|
||||||
if ((ret = write_flv_header()) != ERROR_SUCCESS) {
|
if ((ret = write_flv_header()) != ERROR_SUCCESS) {
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
segment->path = path;
|
segment->path = path;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue