mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
fix #420, remove ts for hls ram mode.
This commit is contained in:
parent
679583dad6
commit
26b76c0e4c
7 changed files with 111 additions and 29 deletions
|
@ -787,12 +787,19 @@ int SrsHlsMuxer::segment_close(string log_desc)
|
|||
for (int i = 0; i < (int)segment_to_remove.size(); i++) {
|
||||
SrsHlsSegment* segment = segment_to_remove[i];
|
||||
|
||||
if (hls_cleanup) {
|
||||
if (hls_cleanup && should_write_file) {
|
||||
if (unlink(segment->full_path.c_str()) < 0) {
|
||||
srs_warn("cleanup unlink path failed, file=%s.", segment->full_path.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
if (should_write_cache) {
|
||||
if ((ret = handler->on_remove_ts(req, segment->uri)) != ERROR_SUCCESS) {
|
||||
srs_warn("remove the ts from ram hls failed. ret=%d", ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
srs_freep(segment);
|
||||
}
|
||||
segment_to_remove.clear();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue