X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fmodules%2Ffrei0r%2Ftransition_frei0r.c;h=4fb6846e5e232924746557f78d0670606ef47e57;hb=ef765a5b52c93b5044a390fbe1c31a412cf59888;hp=46b82fc272b309453bc404dcff24bd6baa6b06a2;hpb=c079de116b132025ee09e8766d773424f17605e9;p=melted diff --git a/src/modules/frei0r/transition_frei0r.c b/src/modules/frei0r/transition_frei0r.c index 46b82fc..4fb6846 100644 --- a/src/modules/frei0r/transition_frei0r.c +++ b/src/modules/frei0r/transition_frei0r.c @@ -44,11 +44,10 @@ static int transition_get_image( mlt_frame a_frame, uint8_t **image, mlt_image_f if ( mlt_properties_get_double( b_props, "aspect_ratio" ) == 0.0 ) mlt_properties_set_double( b_props, "aspect_ratio", mlt_properties_get_double( a_props, "consumer_aspect_ratio" ) ); mlt_properties_set_double( b_props, "consumer_aspect_ratio", mlt_properties_get_double( a_props, "consumer_aspect_ratio" ) ); - - - *width = mlt_properties_get_int( !invert ? a_props : b_props, "width" ); - *height = mlt_properties_get_int( !invert ? a_props : b_props, "height" ); + if ( mlt_properties_get( b_props, "rescale.interp" ) == NULL || !strcmp( mlt_properties_get( b_props, "rescale.interp" ), "none" ) ) + mlt_properties_set( b_props, "rescale.interp", "nearest" ); + uint8_t *images[]={NULL,NULL,NULL}; mlt_frame_get_image( a_frame, &images[0], format, width, height, 1 ); @@ -63,10 +62,11 @@ static int transition_get_image( mlt_frame a_frame, uint8_t **image, mlt_image_f float pos=( float )( position - in ) / ( float )( out - in + 1 ); - process_frei0r_item( transition_type , pos , properties, a_frame, images, format, width,height, writable ); - if (images[2]){ - *image=images[2]; - } + process_frei0r_item( transition_type , pos , properties, !invert ? a_frame : b_frame , images , format, width,height, writable ); + + *width = mlt_properties_get_int( !invert ? a_props : b_props, "width" ); + *height = mlt_properties_get_int( !invert ? a_props : b_props, "height" ); + *image = mlt_properties_get_data( !invert ? a_props : b_props , "image", NULL ); return 0; }