X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fmodules%2Fplus%2Ftransition_affine.c;h=4b4a34b6edd673e349c5f8edf5740dbc349ec9c0;hb=b31b71f329223380c7099c691dba5fe8cb696feb;hp=1cfb64b4330157a2a7f81cad8355161c0b6f73fe;hpb=f00476101550ec7d8e863f6516aa83bc1b524570;p=melted diff --git a/src/modules/plus/transition_affine.c b/src/modules/plus/transition_affine.c index 1cfb64b..4b4a34b 100644 --- a/src/modules/plus/transition_affine.c +++ b/src/modules/plus/transition_affine.c @@ -540,7 +540,7 @@ static int transition_get_image( mlt_frame a_frame, uint8_t **image, mlt_image_f mlt_properties_set_double( b_props, "consumer_aspect_ratio", mlt_properties_get_double( a_props, "consumer_aspect_ratio" ) ); } - mlt_properties_set( b_props, "distort", mlt_properties_get( properties, "distort" ) ); + mlt_properties_set_int( b_props, "distort", mlt_properties_get_int( properties, "distort" ) ); mlt_frame_get_image( b_frame, &b_image, &b_format, &b_width, &b_height, 0 ); result.w = b_width; result.h = b_height; @@ -615,6 +615,9 @@ static int transition_get_image( mlt_frame a_frame, uint8_t **image, mlt_image_f dz = MapZ( affine.matrix, 0, 0 ); + if ( ( int )abs( dz * 1000 ) < 100 ) + dz = dz < 0 ? - 0.1 : 0.1; + if ( mask != NULL ) memset( mask, 0, b_width * b_height ); @@ -698,8 +701,10 @@ mlt_transition transition_affine_init( char *arg ) { mlt_properties_set_int( MLT_TRANSITION_PROPERTIES( transition ), "sx", 1 ); mlt_properties_set_int( MLT_TRANSITION_PROPERTIES( transition ), "sy", 1 ); - mlt_properties_set( MLT_TRANSITION_PROPERTIES( transition ), "distort", NULL ); + mlt_properties_set_int( MLT_TRANSITION_PROPERTIES( transition ), "distort", 0 ); mlt_properties_set( MLT_TRANSITION_PROPERTIES( transition ), "start", "0,0:100%x100%" ); + // Inform apps and framework that this is a video only transition + mlt_properties_set_int( MLT_TRANSITION_PROPERTIES( transition ), "_transition_type", 1 ); transition->process = transition_process; } return transition;