]> git.sesse.net Git - mlt/blobdiff - src/modules/core/filter_imageconvert.c
Factor out some frame properties in transitions.
[mlt] / src / modules / core / filter_imageconvert.c
index 99378604b1658a062a915bc7d81476abc49f0b27..1dfc8b9c90bbb37ee761ed5f1b0e90dcdcf4875b 100644 (file)
@@ -324,8 +324,9 @@ static int convert_image( mlt_frame frame, uint8_t **buffer, mlt_image_format *f
        {
                conversion_function converter = conversion_matrix[ *format - 1 ][ requested_format - 1 ];
 
-               mlt_log_debug( NULL, "[filter imageconvert] %s -> %s\n",
-                       mlt_image_format_name( *format ), mlt_image_format_name( requested_format ) );
+               mlt_log_debug( NULL, "[filter imageconvert] %s -> %s @ %dx%d\n",
+                       mlt_image_format_name( *format ), mlt_image_format_name( requested_format ),
+                       width, height );
                if ( converter )
                {
                        int size = width * height * bpp_table[ requested_format - 1 ];
@@ -342,9 +343,9 @@ static int convert_image( mlt_frame frame, uint8_t **buffer, mlt_image_format *f
 
                        if ( !( error = converter( *buffer, image, alpha, width, height ) ) )
                        {
-                               mlt_properties_set_data( properties, "image", image, size, mlt_pool_release, NULL );
+                               mlt_frame_set_image( frame, image, size, mlt_pool_release );
                                if ( alpha && ( *format == mlt_image_rgb24a || *format == mlt_image_opengl ) )
-                                       mlt_properties_set_data( properties, "alpha", alpha, alpha_size, mlt_pool_release, NULL );
+                                       mlt_frame_set_alpha( frame, alpha, alpha_size, mlt_pool_release );
                                *buffer = image;
                                *format = requested_format;
                        }
@@ -360,8 +361,6 @@ static int convert_image( mlt_frame frame, uint8_t **buffer, mlt_image_format *f
                        error = 1;
                }
        }
-       if ( !error )
-               mlt_properties_set_int( properties, "format", *format );
 
        return error;
 }