if ( error == 0 )
{
playlist_entry *entry = this->list[ clip ];
- if ( position >= 0 && position < entry->frame_count )
+ position = position < 0 ? entry->frame_count + position - 1 : position;
+ if ( position >= 0 && position <= entry->frame_count )
{
mlt_producer split = NULL;
int in = entry->frame_in;
playlist_entry *entry = this->list[ clip ];
mlt_playlist_append( new_clip, entry->producer );
mlt_playlist_repeat_clip( new_clip, i, entry->repeat );
+ if ( entry->frame_count == entry->repeat )
+ mlt_properties_set_int( mlt_playlist_properties( new_clip ), "hide", 2 );
entry->preservation_hack = 1;
mlt_playlist_remove( this, clip );
}
track_a = mlt_producer_cut( clip_a->producer, clip_a->frame_out - length + 1, clip_a->frame_out );
track_b = mlt_producer_cut( clip_b->producer, clip_b->frame_in, clip_b->frame_in + length - 1 );
- // Temporary - for the benefit of westley serialisation
- mlt_properties_set_int( mlt_producer_properties( track_a ), "cut", 1 );
- mlt_properties_set_int( mlt_producer_properties( track_b ), "cut", 1 );
-
// Set the tracks on the tractor
mlt_tractor_set_track( tractor, track_a, 0 );
mlt_tractor_set_track( tractor, track_b, 1 );
mlt_producer mlt_playlist_get_clip( mlt_playlist this, int clip )
{
- if ( clip > 0 && clip < this->count )
+ if ( clip >= 0 && clip < this->count )
return this->list[ clip ]->producer;
return NULL;
}