]> git.sesse.net Git - mlt/blobdiff - src/modules/core/filter_brightness.c
Fix calloc() parameter ordering
[mlt] / src / modules / core / filter_brightness.c
index 891f4b39864cee627dc1eb2d01417cb34d3965ed..0a2bddb4160268929d111022a3e717d81772ff2a 100644 (file)
@@ -74,12 +74,8 @@ static mlt_frame filter_process( mlt_filter this, mlt_frame frame )
        if ( mlt_properties_get( MLT_FILTER_PROPERTIES( this ), "end" ) != NULL )
        {
                // Determine the time position of this frame in the transition duration
-               mlt_position in = mlt_filter_get_in( this );
-               mlt_position out = mlt_filter_get_out( this );
-               mlt_position time = mlt_frame_get_position( frame );
-               double position = ( double )( time - in ) / ( double )( out - in + 1 );
                double end = fabs( mlt_properties_get_double( MLT_FILTER_PROPERTIES( this ), "end" ) );
-               level += ( end - level ) * position;
+               level += ( end - level ) * mlt_filter_get_progress( this, frame );
        }
 
        // Push the frame filter