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'];
|
$size = $segments[0]['size'];
|
||||||
$timestamp = $segments[0]['timestamp'];
|
$timestamp = $segments[0]['timestamp'];
|
||||||
$duration = $segments[0]['duration'];
|
$duration = $segments[0]['duration'];
|
||||||
$nextTarget = $timestamp + $target;
|
//$nextTarget = $timestamp + $target;
|
||||||
$nextDuration = $target;
|
$nextDuration = $target;
|
||||||
$i = 1;
|
$i = 1;
|
||||||
while ( $i < $n - 1 ) {
|
while ( $i < $n ) {
|
||||||
// Append segments until we get close
|
// Append segments until we get close
|
||||||
while ( $i < $n - 1 && $duration < $nextDuration ) {
|
while ( $i < $n - 1 && $duration < $nextDuration ) {
|
||||||
$total = $duration + $segments[$i]['duration'];
|
$total = $duration + $segments[$i]['duration'];
|
||||||
|
@ -689,8 +689,8 @@ function consolidate( $target, $segments ) {
|
||||||
'timestamp' => $timestamp,
|
'timestamp' => $timestamp,
|
||||||
'duration' => $duration,
|
'duration' => $duration,
|
||||||
];
|
];
|
||||||
$nextTarget += $target;
|
//$nextTarget += $target;
|
||||||
$nextDuration = $nextTarget - $timestamp - $duration;
|
//$nextDuration = $nextTarget - $timestamp - $duration;
|
||||||
|
|
||||||
if ( $i < $n ) {
|
if ( $i < $n ) {
|
||||||
$segment = $segments[$i];
|
$segment = $segments[$i];
|
||||||
|
|
Loading…
Reference in a new issue