double length = out - in + 1;
double x = ( double ) ( position - in ) / length;
double y = ( double ) ( position + 1 - in ) / length;
- progress = length * ( y - x ) / 2.0;
+ progress = ( y - x ) / 2.0;
}
return progress;
}
// Calculate the position
double delta = mlt_transition_get_progress_delta( this, a_frame );
+ mlt_position length = mlt_transition_get_length( this );
// Get the image from the b frame
uint8_t *image_b = NULL;
for ( field = 0; field < ( progressive ? 1 : 2 ); field++ )
{
// Assume lower field (0) first
- double field_position = position + field * delta;
+ double field_position = position + field * delta * length;
// Do the calculation if we need to
// NB: Locks needed here since the properties are being modified