summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-02-02 21:18:21 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-02-02 21:18:21 +0000
commit75bfddd3a2679130bf5d8fe9623a864526200923 (patch)
tree1c96376555720e282eb33e46a0c859b8378f80ff /libvo
parentc5fea2a0e37328fd2e603ffe76a5c87385a361da (diff)
downloadmpv-75bfddd3a2679130bf5d8fe9623a864526200923.tar.bz2
mpv-75bfddd3a2679130bf5d8fe9623a864526200923.tar.xz
Remove pointless initializers and also set geometry_*_changed to 0 when
-geometry did not adjust some values (instead of only ever setting them to 1 and never reset them). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30492 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/geometry.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/libvo/geometry.c b/libvo/geometry.c
index e8f0826bf9..056a05facb 100644
--- a/libvo/geometry.c
+++ b/libvo/geometry.c
@@ -25,10 +25,10 @@
#include "mp_msg.h"
/* A string of the form [WxH][+X+Y] or xpos[%]:ypos[%] */
-char *vo_geometry = NULL;
+char *vo_geometry;
// set when either width or height is changed
-int geometry_wh_changed = 0;
-int geometry_xy_changed = 0;
+int geometry_wh_changed;
+int geometry_xy_changed;
#define RESET_GEOMETRY width = height = xoff = yoff = xper = yper = INT_MIN;
@@ -96,10 +96,8 @@ int geometry(int *xpos, int *ypos, int *widw, int *widh, int scrw, int scrh)
if (width > 0 && widw) *widw = width;
if (height > 0 && widh) *widh = height;
- if (width > 0 || height > 0)
- geometry_wh_changed = 1;
- if (xoff != INT_MIN || yoff != INT_MIN)
- geometry_xy_changed = 1;
+ geometry_wh_changed = width > 0 || height > 0;
+ geometry_xy_changed = xoff != INT_MIN || yoff != INT_MIN;
}
return 1;
}