X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fframework%2Fmlt_producer.c;h=1b86f6c98c0f08e5b0cf4f9baff7e183747f706e;hb=b41fc3efd457b709d4f9867273f6d0da8921b904;hp=d84a0eb0571aeee2609230ad58c994222c86cb88;hpb=05008d72aac63b4abca2bc51b9c6e73a722d5703;p=melted diff --git a/src/framework/mlt_producer.c b/src/framework/mlt_producer.c index d84a0eb..1b86f6c 100644 --- a/src/framework/mlt_producer.c +++ b/src/framework/mlt_producer.c @@ -194,8 +194,8 @@ mlt_producer mlt_producer_cut( mlt_producer this, int in, int out ) // Special case - allow for a cut of the entire producer (this will squeeze all other cuts to 0) if ( in <= 0 ) in = 0; - if ( ( out < 0 || out >= mlt_producer_get_playtime( parent ) ) && !mlt_producer_is_blank( this ) ) - out = mlt_producer_get_playtime( parent ) - 1; + if ( ( out < 0 || out >= mlt_producer_get_length( parent ) ) && !mlt_producer_is_blank( this ) ) + out = mlt_producer_get_length( parent ) - 1; mlt_properties_inc_ref( parent_props ); mlt_properties_set_int( properties, "_cut", 1 ); @@ -503,6 +503,10 @@ static int producer_get_frame( mlt_service service, mlt_frame_ptr frame, int ind // We're done with the clone now mlt_properties_set_data( parent_properties, "use_clone", NULL, 0, NULL, NULL ); + // This is useful and required by always_active transitions to determine in/out points of the cut + if ( mlt_properties_get_data( MLT_FRAME_PROPERTIES( *frame ), "_producer", NULL ) == MLT_PRODUCER_SERVICE( parent ) ) + mlt_properties_set_data( MLT_FRAME_PROPERTIES( *frame ), "_producer", this, 0, NULL, NULL ); + mlt_properties_set_double( MLT_FRAME_PROPERTIES( *frame ), "_speed", speed ); mlt_producer_prepare_next( this ); }