From bd5ec5065ebb8f2ff3f1ab3d7bc14097afc93e2d Mon Sep 17 00:00:00 2001 From: reimar Date: Fri, 20 Nov 2009 23:36:16 +0000 Subject: Use calloc to allocate a rather large (currently 32k) array instead of putting it on the stack, performance should not matter much here. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29938 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/gl_common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libvo/gl_common.c b/libvo/gl_common.c index 1bf8c906c3..a6a7362da9 100644 --- a/libvo/gl_common.c +++ b/libvo/gl_common.c @@ -695,7 +695,7 @@ static void store_weights(float x, GLfloat *dst) { * \param unit texture unit to attach texture to */ static void gen_spline_lookup_tex(GLenum unit) { - GLfloat tex[4 * LOOKUP_BSPLINE_RES]; + GLfloat *tex = calloc(4 * LOOKUP_BSPLINE_RES, sizeof(*tex)); GLfloat *tp = tex; int i; for (i = 0; i < LOOKUP_BSPLINE_RES; i++) { @@ -712,6 +712,7 @@ static void gen_spline_lookup_tex(GLenum unit) { glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_WRAP_S, GL_REPEAT); ActiveTexture(GL_TEXTURE0); + free(tex); } static const char *bilin_filt_template = -- cgit v1.2.3