# HG changeset patch # User al # Date 1107971921 0 # Node ID 58f061d12c835fb2644e00a91c6c6b5ac4efda3c # Parent eb884d12bad575c93546dfdf17e279fe7aebe4f0 Fix the behaviour of -geometry according to the documentation. Patch by Bjorn Danielsson diff -r eb884d12bad5 -r 58f061d12c83 libvo/geometry.c --- a/libvo/geometry.c Wed Feb 09 16:49:39 2005 +0000 +++ b/libvo/geometry.c Wed Feb 09 17:58:41 2005 +0000 @@ -31,20 +31,21 @@ 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);