1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Refine get_hls_window in time unit

This commit is contained in:
winlin 2019-04-16 08:20:32 +08:00
parent ca705a6f62
commit 917f6d066d
7 changed files with 18 additions and 16 deletions

View file

@ -6144,9 +6144,9 @@ double SrsConfig::get_hls_aof_ratio(string vhost)
return ::atof(conf->arg0().c_str());
}
double SrsConfig::get_hls_window(string vhost)
srs_utime_t SrsConfig::get_hls_window(string vhost)
{
static double DEFAULT = 60;
static srs_utime_t DEFAULT = (60 * SRS_UTIME_SECONDS);
SrsConfDirective* conf = get_hls(vhost);
if (!conf) {
@ -6158,7 +6158,7 @@ double SrsConfig::get_hls_window(string vhost)
return DEFAULT;
}
return ::atof(conf->arg0().c_str());
return srs_utime_t(::atof(conf->arg0().c_str()) * SRS_UTIME_SECONDS);
}
string SrsConfig::get_hls_on_error(string vhost)