diff options
author | al <al@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-02-09 17:58:41 +0000 |
---|---|---|
committer | al <al@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-02-09 17:58:41 +0000 |
commit | d568eaa2712bd0399d4f9e7151dd5d664f39e8ae (patch) | |
tree | 5d4e79beda7842ffceabdda21f17dba505bbe745 /libvo/geometry.c | |
parent | 034ff6cafc3388976058c99da5649d5bc2d46490 (diff) | |
download | mpv-d568eaa2712bd0399d4f9e7151dd5d664f39e8ae.tar.bz2 mpv-d568eaa2712bd0399d4f9e7151dd5d664f39e8ae.tar.xz |
Fix the behaviour of -geometry according to the documentation.
Patch by Bjorn Danielsson <mplayer-mail ta dax tod nu>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14679 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/geometry.c')
-rw-r--r-- | libvo/geometry.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/libvo/geometry.c b/libvo/geometry.c index fbafb5a955..1fb402970c 100644 --- a/libvo/geometry.c +++ b/libvo/geometry.c @@ -31,20 +31,21 @@ int geometry(int *xpos, int *ypos, int *widw, int *widh, int scrw, int scrh) RESET_GEOMETRY if(sscanf(vo_geometry, "+%i+%i", &xoff, &yoff) != 2) { + char percent[2]; RESET_GEOMETRY - if(sscanf(vo_geometry, "%i:%i", &xoff, &yoff) != 2) + if(sscanf(vo_geometry, "%i%%:%i%1[%]", &xper, &yper, &percent) != 3) { RESET_GEOMETRY - if(sscanf(vo_geometry, "%i:%i%%", &xper, &yper) != 2) + if(sscanf(vo_geometry, "%i:%i%1[%]", &xoff, &yper, &percent) != 3) { RESET_GEOMETRY - if(sscanf(vo_geometry, "%i%%:%i", &xper, &yper) != 2) + if(sscanf(vo_geometry, "%i%%:%i", &xper, &yoff) != 2) { RESET_GEOMETRY - if(sscanf(vo_geometry, "%i%%:%i%%", &xper, &yper) != 2) + if(sscanf(vo_geometry, "%i:%i", &xoff, &yoff) != 2) { RESET_GEOMETRY - if(sscanf(vo_geometry, "%i%%", &xper) != 1) + if(sscanf(vo_geometry, "%i%1[%]", &xper, &percent) != 2) { mp_msg(MSGT_VO, MSGL_ERR, "-geometry must be in [WxH][+X+Y] | [X[%%]:[Y[%%]]] format, incorrect (%s)\n", vo_geometry); |