Skip to content

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalbaljet committed Jan 3, 2022
1 parent 6b0d6ef commit 5e80a81
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All Notable changes to `pbmedia/laravel-ffmpeg` will be documented in this file

## 7.7.1 - 2021-01-03

### Fixed

- Fix for missing `$remaining` and `$rate` values when using the progress handler on exports with multiple inputs/outputs.

## 7.7.0 - 2021-12-31

### Added
Expand Down
2 changes: 1 addition & 1 deletion src/Exporters/MediaExporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ private function saveWithMappings(): MediaOpener
}

if ($this->onProgressCallback) {
call_user_func($this->onProgressCallback, 100);
call_user_func($this->onProgressCallback, 100, 0, 0);
}

$this->maps->map->getOutputMedia()->each->copyAllFromTemporaryDirectory($this->visibility);
Expand Down
2 changes: 2 additions & 0 deletions tests/HlsExportTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,8 @@ public function it_can_use_a_custom_format_for_the_segment_naming()
->addFormat($midBitrate)
->setSegmentLength(5)
->setKeyFrameInterval(24)
->onProgress(function ($percentage, $remaining, $rate) {
})
->withPlaylistGenerator(new HLSPlaylistGenerator)
->useSegmentFilenameGenerator(function ($name, $format, $key, callable $segments, callable $playlist) {
$segments("N{$name}B{$format->getKiloBitrate()}K{$key}_%02d.ts");
Expand Down

0 comments on commit 5e80a81

Please sign in to comment.