+ clone = parent;
+ }
+
+ // We need to seek to the correct position in the clone
+ mlt_producer_seek( clone, mlt_producer_get_in( self ) + mlt_properties_get_int( properties, "_position" ) );
+
+ // Assign the clone property to the parent
+ mlt_properties_set_data( parent_properties, "use_clone", clone, 0, NULL, NULL );
+
+ // Now get the frame from the parents service
+ result = mlt_service_get_frame( MLT_PRODUCER_SERVICE( parent ), frame, index );
+
+ // 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", self, 0, NULL, NULL );
+
+ mlt_properties_set_double( MLT_FRAME_PROPERTIES( *frame ), "_speed", speed );
+ mlt_producer_prepare_next( self );
+ }
+ else
+ {
+ *frame = mlt_frame_init( service );
+ result = 0;
+ }
+
+ // Pass on all meta properties from the producer/cut on to the frame
+ if ( *frame != NULL && self != NULL )
+ {
+ int i = 0;
+ mlt_properties p_props = MLT_PRODUCER_PROPERTIES( self );
+ mlt_properties f_props = MLT_FRAME_PROPERTIES( *frame );
+ mlt_properties_lock( p_props );
+ int count = mlt_properties_count( p_props );
+ for ( i = 0; i < count; i ++ )
+ {
+ char *name = mlt_properties_get_name( p_props, i );
+ if ( !strncmp( name, "meta.", 5 ) )
+ mlt_properties_set( f_props, name, mlt_properties_get_value( p_props, i ) );
+ else if ( !strncmp( name, "set.", 4 ) )
+ mlt_properties_set( f_props, name + 4, mlt_properties_get_value( p_props, i ) );