Mercurial > mplayer.hg
changeset 36236:6e2919257e92
Ensure that the allocated surface is always large enough.
author | reimar |
---|---|
date | Tue, 11 Jun 2013 18:38:56 +0000 |
parents | c00402488d80 |
children | dc06b09d02a4 |
files | libvo/vo_sdl.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libvo/vo_sdl.c Mon Jun 10 21:33:28 2013 +0000 +++ b/libvo/vo_sdl.c Tue Jun 11 18:38:56 2013 +0000 @@ -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 @@ 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;