X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fmodules%2Fwestley%2Fproducer_westley.c;h=6ea81c7e12983c76a82d674207d688be8416f34a;hb=b917ae819659606f59b3ae761d06ab2095ade658;hp=4e5bad86a77c868dc118355890aab53e2d5ec1c6;hpb=519393231e6ab626f19bd01d4622d1c3759fcc93;p=melted diff --git a/src/modules/westley/producer_westley.c b/src/modules/westley/producer_westley.c index 4e5bad8..6ea81c7 100644 --- a/src/modules/westley/producer_westley.c +++ b/src/modules/westley/producer_westley.c @@ -640,7 +640,7 @@ static void on_start_entry( deserialise_context context, const xmlChar *name, co } mlt_playlist_get_clip_info( MLT_PLAYLIST( parent ), &info, mlt_playlist_count( MLT_PLAYLIST( parent ) ) - 1 ); - entry = info.producer; + entry = info.cut; } else { @@ -719,17 +719,23 @@ static void on_end_track( deserialise_context context, const xmlChar *name ) if ( multitrack != NULL ) { // Set the track on the multitrack - mlt_multitrack_connect( multitrack, producer, mlt_multitrack_count( multitrack ) ); // Set producer i/o if specified - if ( mlt_properties_get( track_props, "in" ) != NULL || - mlt_properties_get( track_props, "out" ) != NULL ) + if ( mlt_properties_get( track_props, "in" ) != NULL && + mlt_properties_get( track_props, "out" ) != NULL ) { - mlt_producer_set_in_and_out( MLT_PRODUCER( producer ), + mlt_producer cut = mlt_producer_cut( MLT_PRODUCER( producer ), mlt_properties_get_position( track_props, "in" ), mlt_properties_get_position( track_props, "out" ) ); + mlt_properties_set_int( mlt_producer_properties( cut ), "cut", 1 ); + mlt_multitrack_connect( multitrack, cut, mlt_multitrack_count( multitrack ) ); + mlt_producer_close( cut ); } - + else + { + mlt_multitrack_connect( multitrack, producer, mlt_multitrack_count( multitrack ) ); + } + // Set the hide state of the track producer char *hide_s = mlt_properties_get( track_props, "hide" ); if ( hide_s != NULL )