summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-11-20 23:36:16 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-11-20 23:36:16 +0000
commitbd5ec5065ebb8f2ff3f1ab3d7bc14097afc93e2d (patch)
treeff51ef4e375ffab8edcb3be8179fc32c1e12ebd8 /libvo
parentdc6a72386cf52dd310b5e765cfff595eac2ed596 (diff)
downloadmpv-bd5ec5065ebb8f2ff3f1ab3d7bc14097afc93e2d.tar.bz2
mpv-bd5ec5065ebb8f2ff3f1ab3d7bc14097afc93e2d.tar.xz
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
Diffstat (limited to 'libvo')
-rw-r--r--libvo/gl_common.c3
1 files changed, 2 insertions, 1 deletions
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 =