From c39fdc6de4b627bf5296608dc6d9e5910cd9b1b6 Mon Sep 17 00:00:00 2001 From: lilo_booter Date: Sat, 25 Sep 2004 14:00:52 +0000 Subject: [PATCH] Whoops - mix fix git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@447 d19143bc-622f-0410-bfdd-b5b2a6649095 --- src/framework/mlt_playlist.c | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/framework/mlt_playlist.c b/src/framework/mlt_playlist.c index 762cfa3..9cdc8cf 100644 --- a/src/framework/mlt_playlist.c +++ b/src/framework/mlt_playlist.c @@ -792,9 +792,6 @@ int mlt_playlist_mix( mlt_playlist this, int clip, int length, mlt_transition tr track_b = mlt_producer_cut( clip_b->producer, clip_b->frame_in, clip_b->frame_in + length - 1 ); mlt_properties_set_int( mlt_producer_properties( track_b ), "cut", 1 ); - mlt_playlist_resize_clip( this, clip, clip_a->frame_in, clip_a->frame_out - length + 1 ); - mlt_playlist_resize_clip( this, clip + 1, clip_b->frame_in + length, clip_b->frame_out ); - mlt_tractor_set_track( tractor, track_a, 0 ); mlt_tractor_set_track( tractor, track_b, 1 ); mlt_playlist_insert( this, mlt_tractor_producer( tractor ), clip + 1, -1, -1 ); @@ -807,10 +804,14 @@ int mlt_playlist_mix( mlt_playlist this, int clip, int length, mlt_transition tr mlt_transition_set_in_and_out( transition, 0, length - 1 ); } - if ( clip_b->frame_count <= 0 ) + if ( clip_b->frame_out - clip_b->frame_in > length ) + mlt_playlist_resize_clip( this, clip + 2, clip_b->frame_in + length, clip_b->frame_out ); + else mlt_playlist_remove( this, clip + 2 ); - if ( clip_a->frame_count <= 0 ) + if ( clip_a->frame_out - clip_a->frame_in > length ) + mlt_playlist_resize_clip( this, clip, clip_a->frame_in, clip_a->frame_out - length ); + else mlt_playlist_remove( this, clip ); mlt_events_unblock( mlt_playlist_properties( this ), this ); -- 1.7.4.4