summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-08-14 19:38:16 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-08-14 19:38:16 +0000
commit0ddf1709175512266d5cb73aa205abb740b0fb89 (patch)
tree4f0d6f1f748d2a06c8fb97e9f79e5d3ab7bd6bdd /libvo
parent5543cc2bf5cb82674751e316c60aded300c0cf53 (diff)
downloadmpv-0ddf1709175512266d5cb73aa205abb740b0fb89.tar.bz2
mpv-0ddf1709175512266d5cb73aa205abb740b0fb89.tar.xz
extra check for glUploadTex to avoid a possible hang.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16224 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/gl_common.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libvo/gl_common.c b/libvo/gl_common.c
index ab9358ef1c..78aa26e872 100644
--- a/libvo/gl_common.c
+++ b/libvo/gl_common.c
@@ -330,6 +330,7 @@ void glUploadTex(GLenum target, GLenum format, GLenum type,
const char *data, int stride,
int x, int y, int w, int h, int slice) {
int y_max = y + h;
+ if (w <= 0 || h <= 0) return;
if (slice <= 0)
slice = h;
// this is not always correct, but should work for MPlayer