changeset 16837:098d3c815fe2

10l to whoever got aspect upside-down.. it's w/h, not h/w. hope this doesn't bother anyone already using it too much
author rfelker
date Sun, 23 Oct 2005 15:25:10 +0000
parents a5ff3d90f16d
children fb79161e09f4
files DOCS/man/en/mplayer.1 libmpcodecs/vf_expand.c
diffstat 2 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/DOCS/man/en/mplayer.1	Sun Oct 23 15:05:11 2005 +0000
+++ b/DOCS/man/en/mplayer.1	Sun Oct 23 15:25:10 2005 +0000
@@ -4431,9 +4431,9 @@
 .I EXAMPLE:
 .PD 0
 .RSs
-.IP expand=800::::3/4
+.IP expand=800::::4/3
 Expands to 800x600, unless the source is higher resolution, in which
-case it expands to fill a 3/4 aspect.
+case it expands to fill a 4/3 aspect.
 .RE
 .PD 1
 .IPs <r>\ \ 
--- a/libmpcodecs/vf_expand.c	Sun Oct 23 15:05:11 2005 +0000
+++ b/libmpcodecs/vf_expand.c	Sun Oct 23 15:25:10 2005 +0000
@@ -183,10 +183,10 @@
         else if( vf->priv->exp_h<height ) vf->priv->exp_h=height;
 #endif
     if (vf->priv->aspect) {
-        if (vf->priv->exp_h < vf->priv->exp_w * vf->priv->aspect) {
-            vf->priv->exp_h = vf->priv->exp_w * vf->priv->aspect;
+        if (vf->priv->exp_h < vf->priv->exp_w / vf->priv->aspect) {
+            vf->priv->exp_h = vf->priv->exp_w / vf->priv->aspect;
         } else {
-            vf->priv->exp_w = vf->priv->exp_h / vf->priv->aspect;
+            vf->priv->exp_w = vf->priv->exp_h * vf->priv->aspect;
         }
     }
     if (vf->priv->round > 1) { // round up.