+ Added an option to override alignment and transparent borders for compositing
[melted] / src / modules / core / filter_luma.c
index 22165af..94f06c7 100644 (file)
@@ -58,7 +58,7 @@ static int filter_get_image( mlt_frame this, uint8_t **image, mlt_image_format *
                }
        }
 
-       if ( b_frame == NULL )
+       if ( b_frame == NULL || mlt_properties_get_int( b_frame, "width" ) != *width || mlt_properties_get_int( b_frame, "height" ) != *height )
        {
                b_frame = mlt_frame_init( );
                mlt_properties_set_data( properties, "frame", b_frame, 0, ( mlt_destructor )mlt_frame_close, NULL );
@@ -66,7 +66,7 @@ static int filter_get_image( mlt_frame this, uint8_t **image, mlt_image_format *
 
        if ( luma != NULL && 
                ( mlt_properties_get( properties, "blur" ) != NULL || 
-                 mlt_frame_get_position( this ) % ( out + 1 ) != out ) )
+                 (int)mlt_frame_get_position( this ) % ( out + 1 ) != out ) )
        {
                mlt_properties luma_properties = MLT_TRANSITION_PROPERTIES( luma );
                mlt_properties_pass( luma_properties, properties, "luma." );
@@ -89,6 +89,7 @@ static int filter_get_image( mlt_frame this, uint8_t **image, mlt_image_format *
                        mlt_properties_set_data( b_props, "image", dst, size, mlt_pool_release, NULL );
                        mlt_properties_set_int( b_props, "width", *width );
                        mlt_properties_set_int( b_props, "height", *height );
+                       mlt_properties_set_int( b_props, "format", *format );
                }
        }