[MPlayer-cvslog] r22148 - trunk/libvo/vo_xv.c

reimar subversion at mplayerhq.hu
Mon Feb 5 18:47:43 CET 2007


Author: reimar
Date: Mon Feb  5 18:47:43 2007
New Revision: 22148

Modified:
   trunk/libvo/vo_xv.c

Log:
Sanity check for vo window dimensions, helps avoid division by zero
with -wid.


Modified: trunk/libvo/vo_xv.c
==============================================================================
--- trunk/libvo/vo_xv.c	(original)
+++ trunk/libvo/vo_xv.c	Mon Feb  5 18:47:43 2007
@@ -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



More information about the MPlayer-cvslog mailing list