X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fframework%2Fmlt_pool.c;h=5f891e93cbac5e357537e003926b6ae075894529;hb=b6a2f96c4bb16dcbb03d45f90a8b833f3c6dda8e;hp=16d1e1d4fd3ca0608ffa888c27c94e408f9d8bb9;hpb=0b288164cbeb9a3c98107d439d86844be13ba910;p=melted diff --git a/src/framework/mlt_pool.c b/src/framework/mlt_pool.c index 16d1e1d..5f891e9 100644 --- a/src/framework/mlt_pool.c +++ b/src/framework/mlt_pool.c @@ -220,15 +220,15 @@ void *mlt_pool_alloc( int size ) mlt_pool pool = NULL; // Determines the index of the pool to use - int index = 0; + int index = 8; // Minimum size pooled is 256 bytes - size = size >> 8; + size = size + 4; while ( ( 1 << index ) < size ) index ++; // Now get the pool at the index - pool = mlt_properties_get_data_at( pools, index + 1, NULL ); + pool = mlt_properties_get_data_at( pools, index - 8, NULL ); // Now get the real item return pool_fetch( pool );