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:
parent
ca705a6f62
commit
917f6d066d
7 changed files with 18 additions and 16 deletions
|
@ -201,7 +201,7 @@ void SrsFragmentWindow::append(SrsFragment* fragment)
|
|||
fragments.push_back(fragment);
|
||||
}
|
||||
|
||||
void SrsFragmentWindow::shrink(int64_t window)
|
||||
void SrsFragmentWindow::shrink(srs_utime_t window)
|
||||
{
|
||||
srs_utime_t duration = 0;
|
||||
|
||||
|
@ -211,7 +211,7 @@ void SrsFragmentWindow::shrink(int64_t window)
|
|||
SrsFragment* fragment = fragments[i];
|
||||
duration += fragment->duration();
|
||||
|
||||
if (srsu2ms(duration) > window) {
|
||||
if (duration > window) {
|
||||
remove_index = i;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue