Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix hls & dash segments cleanup. #4161

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions trunk/src/app/srs_app_dash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -703,10 +703,6 @@ void SrsDash::dispose()
srs_error_t SrsDash::cycle()
{
srs_error_t err = srs_success;

if (!enabled) {
return err;
}

if (last_update_time_ <= 0) {
last_update_time_ = srs_get_system_time();
Expand Down Expand Up @@ -738,10 +734,6 @@ srs_error_t SrsDash::cycle()

srs_utime_t SrsDash::cleanup_delay()
{
if (!enabled) {
return 0;
}

// We use larger timeout to cleanup the HLS, after disposed it if required.
return _srs_config->get_dash_dispose(req->vhost) * 1.1;
}
Expand Down
8 changes: 0 additions & 8 deletions trunk/src/app/srs_app_hls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1237,10 +1237,6 @@ srs_error_t SrsHls::cycle()
{
srs_error_t err = srs_success;

if (!enabled) {
return err;
}

if (last_update_time <= 0) {
last_update_time = srs_get_system_time();
}
Expand Down Expand Up @@ -1278,10 +1274,6 @@ srs_error_t SrsHls::cycle()

srs_utime_t SrsHls::cleanup_delay()
{
if (!enabled) {
return 0;
}

// We use larger timeout to cleanup the HLS, after disposed it if required.
return _srs_config->get_hls_dispose(req->vhost) * 1.1;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/src/app/srs_app_source.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1961,7 +1961,7 @@ bool SrsLiveSource::stream_is_dead()
return false;
}

// Delay cleanup source.
// Delay cleanup source for at least SRS_SOURCE_CLEANUP=3 seconds
srs_utime_t now = srs_get_system_time();
if (now < stream_die_at_ + SRS_SOURCE_CLEANUP) {
return false;
Expand Down
Loading