diff --git a/trunk/src/app/srs_app_dash.cpp b/trunk/src/app/srs_app_dash.cpp index 1c5d99a957..082943e79e 100644 --- a/trunk/src/app/srs_app_dash.cpp +++ b/trunk/src/app/srs_app_dash.cpp @@ -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(); @@ -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; } diff --git a/trunk/src/app/srs_app_hls.cpp b/trunk/src/app/srs_app_hls.cpp index 9bc9bdfcb6..bf527cd5cb 100644 --- a/trunk/src/app/srs_app_hls.cpp +++ b/trunk/src/app/srs_app_hls.cpp @@ -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(); } @@ -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; } diff --git a/trunk/src/app/srs_app_source.cpp b/trunk/src/app/srs_app_source.cpp index 956f7b2e3e..02ec438664 100755 --- a/trunk/src/app/srs_app_source.cpp +++ b/trunk/src/app/srs_app_source.cpp @@ -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;