// If there is an end adjust gain to the range
if ( mlt_properties_get( filter_props, "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 = -1;
char *p = mlt_properties_get( filter_props, "end" );
if ( strcmp( p, "" ) != 0 )
end = fabs( end );
if ( end != -1 )
- gain += ( end - gain ) * position;
+ gain += ( end - gain ) * mlt_filter_get_progress( this, frame );
}
}
}
// If there is an end adjust gain to the range
if ( mlt_properties_get( filter_props, "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 );
- amplitude *= position;
+ amplitude *= mlt_filter_get_progress( this, frame );
}
mlt_properties_set_int( instance_props, "normalise", 1 );
mlt_properties_set_double( instance_props, "amplitude", amplitude );