From 6b9365c08286a45bfb23540c1a085aaf041f0987 Mon Sep 17 00:00:00 2001 From: Nicolas Le Goff Date: Wed, 6 Jun 2012 11:11:58 +0200 Subject: [PATCH] fix issue when provided dimensions are null --- src/FFMpeg/Format/Video/DefaultVideo.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/FFMpeg/Format/Video/DefaultVideo.php b/src/FFMpeg/Format/Video/DefaultVideo.php index fcbb26f..a6d6c5f 100644 --- a/src/FFMpeg/Format/Video/DefaultVideo.php +++ b/src/FFMpeg/Format/Video/DefaultVideo.php @@ -97,8 +97,13 @@ abstract class DefaultVideo extends DefaultAudio implements Interactive, Resampl break; case self::RESIZEMODE_FIT: default: - $width = $this->width; - $height = $this->height; + if (null !== $this->width && null !== $this->height) { + $width = $this->width; + $height = $this->height; + } else { + $width = $originalWidth; + $height = $originalHeight; + } break; }