X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fmodules%2Fwestley%2Fproducer_westley.c;h=40e94c14ce8c07f3341309de0f49359d923aa4ce;hb=c12c6c380fa37b6a0d28ce98fdcda487a8aca76d;hp=18aa86bb7212878e4e4c89f7cca0132ddd0d64a0;hpb=de477d594bdd9c5d9ee2d3441cd0ccf49ab52feb;p=melted diff --git a/src/modules/westley/producer_westley.c b/src/modules/westley/producer_westley.c index 18aa86b..40e94c1 100644 --- a/src/modules/westley/producer_westley.c +++ b/src/modules/westley/producer_westley.c @@ -550,7 +550,7 @@ static void on_end_producer( deserialise_context context, const xmlChar *name ) else { // Otherwise, set in and out on producer directly - mlt_producer_set_in_and_out( MLT_PRODUCER( service ), in, out ); + mlt_producer_set_in_and_out( MLT_PRODUCER( producer ), in, out ); } } else @@ -559,7 +559,7 @@ static void on_end_producer( deserialise_context context, const xmlChar *name ) mlt_producer_set_in_and_out( MLT_PRODUCER( producer ), in, out ); } } - + // Push the producer onto the stack context_push_service( context, producer, mlt_producer_type ); } @@ -726,12 +726,12 @@ static void on_end_track( deserialise_context context, const xmlChar *name ) if ( multitrack != NULL ) { - // Set the track on the multitrack - // Set producer i/o if specified - if ( mlt_properties_get( track_props, "in" ) != NULL && + if ( mlt_properties_get( track_props, "in" ) != NULL || mlt_properties_get( track_props, "out" ) != NULL ) { + if ( mlt_properties_get( track_props, "out" ) == NULL ) + mlt_properties_set_position( track_props, "out", mlt_properties_get_position( track_props, "length" ) - 1 ); mlt_producer cut = mlt_producer_cut( MLT_PRODUCER( producer ), mlt_properties_get_position( track_props, "in" ), mlt_properties_get_position( track_props, "out" ) ); @@ -891,6 +891,8 @@ static void on_end_transition( deserialise_context context, const xmlChar *name if ( parent_type == mlt_tractor_type ) { mlt_field field = mlt_tractor_field( MLT_TRACTOR( parent ) ); + if ( mlt_properties_get_int( properties, "a_track" ) == mlt_properties_get_int( properties, "b_track" ) ) + mlt_properties_set_int( properties, "b_track", mlt_properties_get_int( properties, "a_track" ) + 1 ); mlt_field_plant_transition( field, MLT_TRANSITION( effect ), mlt_properties_get_int( properties, "a_track" ), mlt_properties_get_int( properties, "b_track" ) ); @@ -1267,7 +1269,7 @@ mlt_producer producer_westley_init( int info, char *data ) struct _xmlParserCtxt *xmlcontext; int well_formed = 0; char *filename = NULL; - + context->producer_map = mlt_properties_new(); context->destructors = mlt_properties_new(); context->params = mlt_properties_new();