]> git.sesse.net Git - mlt/commitdiff
Fix ramping the mix level in mix transition.
authorDan Dennedy <dan@dennedy.org>
Mon, 16 Aug 2010 08:58:59 +0000 (01:58 -0700)
committerDan Dennedy <dan@dennedy.org>
Mon, 16 Aug 2010 08:58:59 +0000 (01:58 -0700)
Without ramping the same mix level is applied across the samples in the
frame. The result is a stair-stepping effect. With ramping, the mix
levels are actually values _between_ frames and the mix factor gradually
changes from one level to the next across all of the samples in the
frame.

src/modules/core/transition_mix.c

index 756f9fb24d6518721635d09b00d2ab212e4deff9..4950ef098617b5ccd382ec0a7969a97375f9e331 100644 (file)
@@ -244,6 +244,7 @@ static mlt_frame transition_process( mlt_transition this, mlt_frame a_frame, mlt
                        // Initialise transition previous mix value to prevent an inadvertant jump from 0
                        mlt_position last_position = mlt_properties_get_position( properties, "_last_position" );
                        mlt_position current_position = mlt_frame_get_position( b_frame );
+                       mlt_properties_set_position( properties, "_last_position", current_position );
                        if ( mlt_properties_get( properties, "_previous_mix" ) == NULL
                             || current_position != last_position + 1 )
                                mlt_properties_set_double( properties, "_previous_mix", mix );