mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
always increasing target duration, for #304
This commit is contained in:
parent
25af6c6847
commit
e88c1e32ee
1 changed files with 5 additions and 1 deletions
|
@ -204,7 +204,11 @@ int SrsHlsMuxer::update_config(SrsRequest* r, string path, int fragment, int win
|
||||||
hls_path = path;
|
hls_path = path;
|
||||||
hls_fragment = fragment;
|
hls_fragment = fragment;
|
||||||
hls_window = window;
|
hls_window = window;
|
||||||
target_duration = (int)(fragment * _srs_config->get_hls_td_ratio(r->vhost));
|
|
||||||
|
// we always keep the target duration increasing.
|
||||||
|
int max_td = srs_max(target_duration, (int)(fragment * _srs_config->get_hls_td_ratio(r->vhost)));
|
||||||
|
srs_info("hls update target duration %d=>%d", target_duration, max_td);
|
||||||
|
target_duration = max_td;
|
||||||
|
|
||||||
std::string storage = _srs_config->get_hls_storage(r->vhost);
|
std::string storage = _srs_config->get_hls_storage(r->vhost);
|
||||||
if (storage == "ram") {
|
if (storage == "ram") {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue