[MPlayer-cvslog] r36332 - trunk/libvo/vo_sdl.c

reimar subversion at mplayerhq.hu
Tue Jun 11 20:38:57 CEST 2013


Author: reimar
Date: Tue Jun 11 20:38:56 2013
New Revision: 36332

Log:
Ensure that the allocated surface is always large enough.

Modified:
   trunk/libvo/vo_sdl.c

Modified: trunk/libvo/vo_sdl.c
==============================================================================
--- trunk/libvo/vo_sdl.c	Mon Jun 10 23:33:28 2013	(r36331)
+++ trunk/libvo/vo_sdl.c	Tue Jun 11 20:38:56 2013	(r36332)
@@ -68,6 +68,7 @@
 #include "aspect.h"
 #include "libmpcodecs/vfcap.h"
 #include "osdep/setenv.h"
+#include "libavutil/common.h"
 
 #ifdef CONFIG_X11
 #include <X11/Xlib.h>
@@ -712,7 +713,7 @@ static int setup_surfaces(void)
     int surfwidth, surfheight;
 
     surfwidth = priv->width;
-    surfheight = priv->height + (priv->surface->h - priv->dstheight) / v_scale;
+    surfheight = priv->height + FFMAX(priv->surface->h - priv->dstheight, 0) / v_scale + 1;
     surfheight&= ~1;
     /* Place the image in the middle of the screen */
     priv->y = (surfheight - priv->height) / 2;


More information about the MPlayer-cvslog mailing list