WIP
This commit is contained in:
parent
879832dbc9
commit
aacd048f12
1 changed files with 4 additions and 4 deletions
|
@ -662,10 +662,10 @@ function consolidate( $target, $segments ) {
|
|||
$size = $segments[0]['size'];
|
||||
$timestamp = $segments[0]['timestamp'];
|
||||
$duration = $segments[0]['duration'];
|
||||
$nextTarget = $timestamp + $target;
|
||||
//$nextTarget = $timestamp + $target;
|
||||
$nextDuration = $target;
|
||||
$i = 1;
|
||||
while ( $i < $n - 1 ) {
|
||||
while ( $i < $n ) {
|
||||
// Append segments until we get close
|
||||
while ( $i < $n - 1 && $duration < $nextDuration ) {
|
||||
$total = $duration + $segments[$i]['duration'];
|
||||
|
@ -689,8 +689,8 @@ function consolidate( $target, $segments ) {
|
|||
'timestamp' => $timestamp,
|
||||
'duration' => $duration,
|
||||
];
|
||||
$nextTarget += $target;
|
||||
$nextDuration = $nextTarget - $timestamp - $duration;
|
||||
//$nextTarget += $target;
|
||||
//$nextDuration = $nextTarget - $timestamp - $duration;
|
||||
|
||||
if ( $i < $n ) {
|
||||
$segment = $segments[$i];
|
||||
|
|
Loading…
Reference in a new issue