From 1de9390db3f7d3bec8255b64c919cc0373d82d54 Mon Sep 17 00:00:00 2001 From: grosroro Date: Fri, 1 Jun 2012 19:03:00 +0200 Subject: [PATCH] Fix bug --- src/FFMpeg/FFMpeg.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/FFMpeg/FFMpeg.php b/src/FFMpeg/FFMpeg.php index b7d9863..de4b1e3 100644 --- a/src/FFMpeg/FFMpeg.php +++ b/src/FFMpeg/FFMpeg.php @@ -117,7 +117,7 @@ class FFMpeg extends Binary try { $process->run(); } catch (\RuntimeException $e) { - + } if ( ! $process->isSuccessful()) { @@ -198,7 +198,7 @@ class FFMpeg extends Binary try { $process->run(); } catch (\RuntimeException $e) { - + } if ( ! $process->isSuccessful()) { @@ -244,13 +244,19 @@ class FFMpeg extends Binary $originalWidth = $value; continue; } - if ($name == 'value') { + if ($name == 'height') { $originalHeight = $value; continue; } } } + if ($originalHeight !== null && $originalWidth !== null) { + $this->logger->addInfo(sprintf('Read dimension for resizin succesful : %s x %s', $originalWidth, $originalHeight)); + } else { + $this->logger->addInfo(sprintf('Read dimension for resizin failed !')); + } + if ($originalHeight !== null && $originalWidth !== null) { $dimensions = $format->getComputedDimensions($originalWidth, $originalHeight);