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
This commit is contained in:
1 parent
dc6a72386c
commit
bd5ec5065e
1 file changed
+2
-1
+2
-1
@@ -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 =
|
||||
|
||||
Reference in new issue
Block a user