if ( strcmp( temp, "" ) )
args[ count ++ ] = strdup( temp );
}
+ fclose( input );
}
mlt_producer result = producer_melt_init( profile, type, id, args );
int track = 0;
mlt_producer producer = NULL;
mlt_tractor mix = NULL;
- mlt_playlist playlist = mlt_playlist_init( );
+ mlt_playlist playlist = mlt_playlist_new( profile );
mlt_properties group = mlt_properties_new( );
mlt_tractor tractor = mlt_tractor_new( );
mlt_properties properties = MLT_TRACTOR_PROPERTIES( tractor );
if ( producer != NULL && !mlt_producer_is_cut( producer ) )
mlt_playlist_append( playlist, producer );
producer = NULL;
- mlt_playlist_blank( playlist, atof( argv[ ++ i ] ) );
+ if ( strchr( argv[ i + 1 ], ':' ) )
+ mlt_playlist_blank_time( playlist, argv[ ++ i ] );
+ else
+ // support for legacy where plain int is an out point instead of length
+ mlt_playlist_blank( playlist, atof( argv[ ++ i ] ) );
}
else if ( !strcmp( argv[ i ], "-track" ) ||
!strcmp( argv[ i ], "-null-track" ) ||
{
mlt_multitrack_connect( multitrack, MLT_PLAYLIST_PRODUCER( playlist ), track ++ );
track_service( field, playlist, ( mlt_destructor )mlt_playlist_close );
- playlist = mlt_playlist_init( );
+ playlist = mlt_playlist_new( profile );
}
if ( playlist != NULL )
{
track_service( field, playlist, ( mlt_destructor )mlt_playlist_close );
// We must have a playlist to connect
- if ( !mlt_properties_get_int( MLT_PLAYLIST_PROPERTIES( playlist ), "_melt_first" ) ||
- mlt_producer_get_playtime( MLT_PLAYLIST_PRODUCER( playlist ) ) > 0 )
+ if ( playlist && ( !mlt_properties_get_int( MLT_PLAYLIST_PROPERTIES( playlist ), "_melt_first" ) ||
+ mlt_producer_get_playtime( MLT_PLAYLIST_PRODUCER( playlist ) ) > 0 ) )
mlt_multitrack_connect( multitrack, MLT_PLAYLIST_PRODUCER( playlist ), track );
mlt_producer prod = MLT_TRACTOR_PRODUCER( tractor );