X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fframework%2Fmlt_deque.c;h=4d5a2bdb2e495bbb83f448755ae475b252d70f61;hb=5b59ce704d4f317e845afa30c5ade12c0fd22d43;hp=c048310c430b675d6bb84815bc8c997ead297c81;hpb=15a23435c82ba0435061a35611c6afbe24d09e32;p=melted diff --git a/src/framework/mlt_deque.c b/src/framework/mlt_deque.c index c048310..4d5a2bd 100644 --- a/src/framework/mlt_deque.c +++ b/src/framework/mlt_deque.c @@ -40,7 +40,14 @@ struct mlt_deque_s mlt_deque mlt_deque_init( ) { - return calloc( 1, sizeof( struct mlt_deque_s ) ); + mlt_deque this = malloc( sizeof( struct mlt_deque_s ) ); + if ( this != NULL ) + { + this->list = NULL; + this->size = 0; + this->count = 0; + } + return this; } /** Return the number of items in the deque. @@ -58,8 +65,8 @@ static int mlt_deque_allocate( mlt_deque this ) { if ( this->count == this->size ) { - this->list = realloc( this->list, sizeof( void * ) * ( this->size + 10 ) ); - this->size += 10; + this->list = realloc( this->list, sizeof( void * ) * ( this->size + 20 ) ); + this->size += 20; } return this->list == NULL; }