Revision 4e39ab4c

View differences:

libavcodec/utils.c
60 60
    if(min_size < *size) 
61 61
        return ptr;
62 62
    
63
    *size= min_size + 10*1024;
63
    *size= 17*min_size/16 + 32;
64 64

  
65 65
    return av_realloc(ptr, *size);
66 66
}
......
69 69
static unsigned int last_static = 0;
70 70
static unsigned int allocated_static = 0;
71 71
static void** array_static = NULL;
72
static const unsigned int grow_static = 64; // ^2
73 72

  
74 73
/**
75 74
 * allocation of static arrays - do not use for normal allocation.
......
79 78
    void *ptr = av_mallocz(size);
80 79

  
81 80
    if(ptr){ 
82
        array_static =av_fast_realloc(array_static, &allocated_static, last_static+1);
81
        array_static =av_fast_realloc(array_static, &allocated_static, sizeof(void*)*(last_static+1));
83 82
        array_static[last_static++] = ptr;
84 83
    }
85 84

  

Also available in: Unified diff