[MPlayer-cvslog] r20577 - trunk/libmpcodecs/vf_expand.c
reimar
subversion at mplayerhq.hu
Wed Nov 1 11:52:23 CET 2006
Author: reimar
Date: Wed Nov 1 11:52:23 2006
New Revision: 20577
Modified:
trunk/libmpcodecs/vf_expand.c
Log:
Do not modify parsed command-line values on config,
use a local variable instead.
Modified: trunk/libmpcodecs/vf_expand.c
==============================================================================
--- trunk/libmpcodecs/vf_expand.c (original)
+++ trunk/libmpcodecs/vf_expand.c Wed Nov 1 11:52:23 2006
@@ -184,11 +184,12 @@
else if( vf->priv->exp_h<height ) vf->priv->exp_h=height;
#endif
if (vf->priv->aspect) {
- vf->priv->aspect *= ((double)width/height) / ((double)d_width/d_height);
- if (vf->priv->exp_h < vf->priv->exp_w / vf->priv->aspect) {
- vf->priv->exp_h = vf->priv->exp_w / vf->priv->aspect + 0.5;
+ float adjusted_aspect = vf->priv->aspect;
+ adjusted_aspect *= ((double)width/height) / ((double)d_width/d_height);
+ if (vf->priv->exp_h < vf->priv->exp_w / adjusted_aspect) {
+ vf->priv->exp_h = vf->priv->exp_w / adjusted_aspect + 0.5;
} else {
- vf->priv->exp_w = vf->priv->exp_h * vf->priv->aspect + 0.5;
+ vf->priv->exp_w = vf->priv->exp_h * adjusted_aspect + 0.5;
}
}
if (vf->priv->round > 1) { // round up.
More information about the MPlayer-cvslog
mailing list