X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Ftests%2Fhello.c;h=491430482cbd46c61310df8777bb89217a4f6b81;hb=4112170ce8053261b9c67f58df87c2a3573b6602;hp=d3d32df6f9c265025ed0f2043433d728a7e53dd9;hpb=2a800ec4c840132c7a629b764b673dce09771637;p=melted diff --git a/src/tests/hello.c b/src/tests/hello.c index d3d32df..4914304 100644 --- a/src/tests/hello.c +++ b/src/tests/hello.c @@ -51,12 +51,12 @@ mlt_producer create_tracks( int argc, char **argv ) // Create track 0 mlt_producer track0 = create_playlist( argc, argv ); - // Create the watermark track - mlt_producer track1 = mlt_factory_producer( "fezzik", "pango" ); - // Get the length of track0 mlt_position length = mlt_producer_get_playtime( track0 ); + // Create the watermark track + mlt_producer track1 = mlt_factory_producer( "fezzik", "pango:" ); + // Get the properties of track1 mlt_properties properties = mlt_producer_properties( track1 ); @@ -81,11 +81,14 @@ mlt_producer create_tracks( int argc, char **argv ) // Now set the properties on the transition properties = mlt_tractor_properties( tractor ); - // Ensure clean up - the first two are required since this function returns the tractor + // Ensure clean up and set properties correctly mlt_properties_set_data( properties, "multitrack", multitrack, 0, ( mlt_destructor )mlt_multitrack_close, NULL ); mlt_properties_set_data( properties, "field", field, 0, ( mlt_destructor )mlt_field_close, NULL ); + mlt_properties_set_data( properties, "track0", track0, 0, ( mlt_destructor )mlt_producer_close, NULL ); mlt_properties_set_data( properties, "track1", track1, 0, ( mlt_destructor )mlt_producer_close, NULL ); mlt_properties_set_data( properties, "transition", transition, 0, ( mlt_destructor )mlt_transition_close, NULL ); + mlt_properties_set_position( properties, "length", length ); + mlt_properties_set_position( properties, "out", length - 1 ); // Return the tractor return mlt_tractor_producer( tractor );