diff --git a/src/FFMpeg/Format/ProgressListener/AbstractProgressListener.php b/src/FFMpeg/Format/ProgressListener/AbstractProgressListener.php index f92dde1..3311266 100644 --- a/src/FFMpeg/Format/ProgressListener/AbstractProgressListener.php +++ b/src/FFMpeg/Format/ProgressListener/AbstractProgressListener.php @@ -179,6 +179,12 @@ abstract class AbstractProgressListener extends EventEmitter implements Listener if ($this->lastOutput !== null) { $delta = $currentTime - $this->lastOutput; + + // Check the type of the currentSize variable and convert it to an integer if needed. + if(!is_numeric($currentSize)) { + $currentSize = (int)$currentSize; + } + $deltaSize = $currentSize - $this->currentSize; $rate = $deltaSize * $delta; if ($rate > 0) {