]> git.sesse.net Git - mlt/commitdiff
Fix setting the size of a cache up to 200.
authorDan Dennedy <dan@dennedy.org>
Sun, 4 Sep 2011 19:53:04 +0000 (12:53 -0700)
committerDan Dennedy <dan@dennedy.org>
Sun, 4 Sep 2011 19:53:04 +0000 (12:53 -0700)
src/framework/mlt_cache.c

index eba75f956af541af963f9ff6d3576adf6a21cea0..f5b3cfebb88c578c016b1984375aff03553d0d9f 100644 (file)
 #include <pthread.h>
 
 /** the maximum number of data objects to cache per line */
-#define MAX_CACHE_SIZE (10)
+#define MAX_CACHE_SIZE (200)
+
+/** the default number of data objects to cache per line */
+#define DEFAULT_CACHE_SIZE (10)
 
 /** \brief Cache item class
  *
@@ -178,7 +181,7 @@ void mlt_cache_item_close( mlt_cache_item item )
 
 /** Create a new cache.
  *
- * The default size is \p MAX_CACHE_SIZE.
+ * The default size is \p DEFAULT_CACHE_SIZE.
  * \public \memberof mlt_cache_s
  * \return a new cache or NULL if there was an error
  */
@@ -188,7 +191,7 @@ mlt_cache mlt_cache_init()
        mlt_cache result = calloc( 1, sizeof( struct mlt_cache_s ) );
        if ( result )
        {
-               result->size = MAX_CACHE_SIZE;
+               result->size = DEFAULT_CACHE_SIZE;
                result->current = result->A;
                pthread_mutex_init( &result->mutex, NULL );
                result->active = mlt_properties_new();