fix issue when provided dimensions are null

This commit is contained in:
Nicolas Le Goff 2012-06-06 11:11:58 +02:00
commit 6b9365c082

View file

@ -97,8 +97,13 @@ abstract class DefaultVideo extends DefaultAudio implements Interactive, Resampl
break; break;
case self::RESIZEMODE_FIT: case self::RESIZEMODE_FIT:
default: default:
$width = $this->width; if (null !== $this->width && null !== $this->height) {
$height = $this->height; $width = $this->width;
$height = $this->height;
} else {
$width = $originalWidth;
$height = $originalHeight;
}
break; break;
} }