# HG changeset patch # User reimar # Date 1258760176 0 # Node ID ac3e6e27f2c74cf5109288746714f192473970e5 # Parent 3ea2508a43cee88d40454f7c3a2b8738b7f17f88 Use calloc to allocate a rather large (currently 32k) array instead of putting it on the stack, performance should not matter much here. diff -r 3ea2508a43ce -r ac3e6e27f2c7 libvo/gl_common.c --- a/libvo/gl_common.c Fri Nov 20 10:32:45 2009 +0000 +++ b/libvo/gl_common.c Fri Nov 20 23:36:16 2009 +0000 @@ -695,7 +695,7 @@ * \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 @@ 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 =