]> git.sesse.net Git - mlt/blobdiff - src/modules/core/producer_colour.c
Minor corrections with alpha and affines
[mlt] / src / modules / core / producer_colour.c
index f7966ed8322c5a32d8decfcd331a384d746272ea..c1fa1681e3d558814e2f944b5540194a93711ccf 100644 (file)
@@ -128,6 +128,10 @@ static int producer_get_image( mlt_frame frame, uint8_t **buffer, mlt_image_form
        // See if we need to regenerate
        if ( *width != current_width || *height != current_height )
        {
+               // Color the image
+               uint8_t y, u, v;
+               int i = 0;
+
                // Allocate the image
                size = *width * *height * 2;
                image = mlt_pool_alloc( size );
@@ -137,9 +141,6 @@ static int producer_get_image( mlt_frame frame, uint8_t **buffer, mlt_image_form
                mlt_properties_set_int( producer_props, "width", *width );
                mlt_properties_set_int( producer_props, "height", *height );
 
-               // Color the image
-               uint8_t y, u, v;
-               int i = 0;
                RGB2YUV( color.r, color.g, color.b, y, u, v );
 
                while ( i < size )