Pointless improvement on a bad filter :-)
[melted] / src / modules / plus / transition_affine.c
index 806b140..4b4a34b 100644 (file)
@@ -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 );
 
@@ -700,6 +703,8 @@ mlt_transition transition_affine_init( char *arg )
                mlt_properties_set_int( MLT_TRANSITION_PROPERTIES( transition ), "sy", 1 );
                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;