From 3baddb9645a6b0af4a22bc0d60554cf91fa903df Mon Sep 17 00:00:00 2001 From: reimar Date: Mon, 5 Feb 2007 17:47:43 +0000 Subject: Sanity check for vo window dimensions, helps avoid division by zero with -wid. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22148 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_xv.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libvo') diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c index 47e3cf1556..2aff1742b1 100644 --- a/libvo/vo_xv.c +++ b/libvo/vo_xv.c @@ -313,6 +313,8 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, 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 -- cgit v1.2.3