// Specify the eof condition
mlt_properties_set( mlt_playlist_properties( this ), "eof", "pause" );
mlt_properties_set( mlt_playlist_properties( this ), "resource", "<playlist>" );
+ mlt_properties_set( mlt_playlist_properties( this ), "mlt_type", "mlt_producer" );
+
+ this->size = 10;
+ this->list = malloc( this->size * sizeof( playlist_entry * ) );
}
return this;
{
int i;
this->list = realloc( this->list, ( this->size + 10 ) * sizeof( playlist_entry * ) );
- for ( i = this->size; i < this->size + 10; i ++ )
- this->list[ i ] = NULL;
+ for ( i = this->size; i < this->size + 10; i ++ ) this->list[ i ] = NULL;
this->size += 10;
}
else if ( current == dest )
current = src;
+ src_entry = this->list[ src ];
if ( src > dest )
{
- int t = dest;
- dest = src;
- src = t;
+ for ( i = src; i > dest; i -- )
+ this->list[ i ] = this->list[ i - 1 ];
+ }
+ else
+ {
+ for ( i = src; i < dest; i ++ )
+ this->list[ i ] = this->list[ i + 1 ];
}
-
- src_entry = this->list[ src ];
-
- for ( i = src + 1; i <= dest; i ++ )
- this->list[ i - 1 ] = this->list[ i ];
-
this->list[ dest ] = src_entry;
mlt_playlist_get_clip_info( this, ¤t_info, current );
void mlt_playlist_close( mlt_playlist this )
{
+ int i = 0;
mlt_producer_close( &this->parent );
mlt_producer_close( &this->blank );
+ for ( i = 0; i < this->count; i ++ )
+ free( this->list[ i ] );
+ free( this->list );
free( this );
}