# HG changeset patch # User reimar # Date 1170697663 0 # Node ID bca522054afe94632e84656b971201d81a0a69bf # Parent 32a28daf0cf4651b0aab4649cb8751b42e17fbca Sanity check for vo window dimensions, helps avoid division by zero with -wid. diff -r 32a28daf0cf4 -r bca522054afe libvo/vo_xv.c --- a/libvo/vo_xv.c Mon Feb 05 17:15:44 2007 +0000 +++ b/libvo/vo_xv.c Mon Feb 05 17:47:43 2007 +0000 @@ -313,6 +313,8 @@ XGetGeometry(mDisplay, vo_window, &mRoot, &drwX, &drwY, &vo_dwidth, &vo_dheight, &drwBorderWidth, &drwDepth); + if (vo_dwidth <= 0) vo_dwidth = d_width; + if (vo_dheight <= 0) vo_dheight = d_height; drwX = drwY = 0; // coordinates need to be local to the window aspect_save_prescale(vo_dwidth, vo_dheight); } else