some temporary fixes
[melted] / mlt / src / modules / core / transition_luma.c
index a3ae3dc..fc712ea 100644 (file)
@@ -339,10 +339,10 @@ static mlt_frame transition_process( mlt_transition transition, mlt_frame a_fram
        }
 
        // Determine the time position of this frame in the transition duration
-       mlt_timecode in = mlt_transition_get_in( transition );
-       mlt_timecode out = mlt_transition_get_out( transition );
-       mlt_timecode time = mlt_frame_get_timecode( b_frame );
-       double pos = ( time - in ) / ( out - in );
+       mlt_position in = mlt_transition_get_in( transition );
+       mlt_position out = mlt_transition_get_out( transition );
+       mlt_position time = mlt_frame_get_position( b_frame );
+       double pos = ( (double)time - (double)in ) / ( (double)out - (double)in + 1 );
        
        // Set the b frame properties
        mlt_properties_set_double( b_props, "mix", pos );