mlt_producer producer = mlt_properties_get_data( properties, "producer", NULL );
mlt_transition transition = mlt_properties_get_data( properties, "transition", NULL );
mlt_frame a_frame = NULL;
+ mlt_profile profile = mlt_service_profile( MLT_FILTER_SERVICE( filter ) );
if ( producer == NULL )
{
char *background = mlt_properties_get( properties, "background" );
- mlt_profile profile = mlt_service_profile( MLT_FILTER_SERVICE( filter ) );
producer = mlt_factory_producer( profile, NULL, background );
mlt_properties_set_data( properties, "producer", producer, 0, (mlt_destructor)mlt_producer_close, NULL );
}
if ( transition == NULL )
{
- mlt_profile profile = mlt_service_profile( MLT_FILTER_SERVICE( filter ) );
transition = mlt_factory_transition( profile, "affine", NULL );
mlt_properties_set_data( properties, "transition", transition, 0, (mlt_destructor)mlt_transition_close, NULL );
}
mlt_properties frame_properties = MLT_FRAME_PROPERTIES( this );
mlt_position in = mlt_filter_get_in( filter );
mlt_position out = mlt_filter_get_out( filter );
- double consumer_ar = mlt_properties_get_double( frame_properties, "consumer_aspect_ratio" );
+ double consumer_ar = mlt_profile_sar( profile );
mlt_transition_set_in_and_out( transition, in, out );
if ( out > 0 ) {
mlt_properties_set_position( MLT_PRODUCER_PROPERTIES( producer ), "length", out - in + 1 );
// mlt_properties_set_int( MLT_FRAME_PROPERTIES( a_frame ), "distort", 1 );
// Special case - aspect_ratio = 0
- if ( mlt_properties_get_double( frame_properties, "aspect_ratio" ) == 0 )
- mlt_properties_set_double( frame_properties, "aspect_ratio", consumer_ar );
- if ( mlt_properties_get_double( MLT_FRAME_PROPERTIES( a_frame ), "aspect_ratio" ) == 0 )
- mlt_properties_set_double( MLT_FRAME_PROPERTIES( a_frame ), "aspect_ratio", consumer_ar );
- mlt_properties_set_double( MLT_FRAME_PROPERTIES( a_frame ), "consumer_aspect_ratio", consumer_ar );
+ if ( mlt_frame_get_aspect_ratio( this ) == 0 )
+ mlt_frame_set_aspect_ratio( this, consumer_ar );
+ if ( mlt_frame_get_aspect_ratio( a_frame ) == 0 )
+ mlt_frame_set_aspect_ratio( a_frame, consumer_ar );
// Add the affine transition onto the frame stack
mlt_service_unlock( MLT_FILTER_SERVICE( filter ) );