From: lilo_booter Date: Mon, 31 Jan 2005 15:07:35 +0000 (+0000) Subject: Empty track definition fix X-Git-Url: http://research.m1stereo.tv/gitweb?a=commitdiff_plain;h=ad8838c07d33eef4054b811e1560efcd94d76ea5;p=melted Empty track definition fix git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@645 d19143bc-622f-0410-bfdd-b5b2a6649095 --- diff --git a/src/modules/inigo/producer_inigo.c b/src/modules/inigo/producer_inigo.c index 1a1e7d6..cf9d38c 100644 --- a/src/modules/inigo/producer_inigo.c +++ b/src/modules/inigo/producer_inigo.c @@ -135,6 +135,9 @@ mlt_producer producer_inigo_init( char **argv ) mlt_multitrack multitrack = mlt_tractor_multitrack( tractor ); char *title = NULL; + // Assistance for template construction (allows -track usage to specify the first track) + mlt_properties_set_int( MLT_PLAYLIST_PROPERTIES( playlist ), "_inigo_first", 1 ); + // We need to track the number of registered filters mlt_properties_set_int( field_properties, "registered", 0 ); @@ -365,7 +368,8 @@ mlt_producer producer_inigo_init( char **argv ) if ( producer != NULL && !mlt_producer_is_cut( producer ) ) mlt_playlist_append( playlist, producer ); producer = NULL; - if ( mlt_producer_get_playtime( MLT_PLAYLIST_PRODUCER( playlist ) ) > 0 ) + if ( !mlt_properties_get_int( MLT_PLAYLIST_PROPERTIES( playlist ), "_inigo_first" ) || + mlt_producer_get_playtime( MLT_PLAYLIST_PRODUCER( playlist ) ) > 0 ) { mlt_multitrack_connect( multitrack, MLT_PLAYLIST_PRODUCER( playlist ), track ++ ); track_service( field, playlist, ( mlt_destructor )mlt_playlist_close ); @@ -421,7 +425,8 @@ mlt_producer producer_inigo_init( char **argv ) track_service( field, playlist, ( mlt_destructor )mlt_playlist_close ); // We must have a playlist to connect - if ( mlt_playlist_count( playlist ) > 0 ) + if ( !mlt_properties_get_int( MLT_PLAYLIST_PROPERTIES( playlist ), "_inigo_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 );