mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Refine get_dash_fragment to time unit
This commit is contained in:
parent
bb6389143f
commit
4302ab7708
10 changed files with 99 additions and 21 deletions
|
@ -5895,9 +5895,9 @@ bool SrsConfig::get_dash_enabled(string vhost)
|
|||
return SRS_CONF_PERFER_FALSE(conf->arg0());
|
||||
}
|
||||
|
||||
int SrsConfig::get_dash_fragment(string vhost)
|
||||
srs_utime_t SrsConfig::get_dash_fragment(string vhost)
|
||||
{
|
||||
static int DEFAULT = 3 * 1000;
|
||||
static int DEFAULT = 3 * SRS_UTIME_SECONDS;
|
||||
|
||||
SrsConfDirective* conf = get_dash(vhost);
|
||||
if (!conf) {
|
||||
|
@ -5909,7 +5909,7 @@ int SrsConfig::get_dash_fragment(string vhost)
|
|||
return DEFAULT;
|
||||
}
|
||||
|
||||
return (int)(1000 * ::atof(conf->arg0().c_str()));
|
||||
return (srs_utime_t)(::atof(conf->arg0().c_str()) * SRS_UTIME_SECONDS);
|
||||
}
|
||||
|
||||
int SrsConfig::get_dash_update_period(string vhost)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue