Set a default duration to 0 to fix issue 333 (#334)

This commit is contained in:
Romain Biard 2017-04-12 13:15:13 -03:00 committed by GitHub
commit edf87d9cb1

View file

@ -79,6 +79,7 @@ class ExtractMultipleFramesFilter implements VideoFilterInterface
public function apply(Video $video, VideoInterface $format)
{
$commands = array();
$duration = 0;
try {
// Get the duration of the video
@ -105,7 +106,7 @@ class ExtractMultipleFramesFilter implements VideoFilterInterface
// Set the number of digits to use in the exported filenames
$nbImages = ceil( $duration * $nbFramesPerSecond );
if($nbImages < 100)
$nbDigitsInFileNames = "02";
elseif($nbImages < 1000)