X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fmodules%2Fcore%2Fproducer_colour.c;h=c1fa1681e3d558814e2f944b5540194a93711ccf;hb=91fb4d73caa09a606c46393c7565462bf926e6a8;hp=f7966ed8322c5a32d8decfcd331a384d746272ea;hpb=b41fc3efd457b709d4f9867273f6d0da8921b904;p=melted diff --git a/src/modules/core/producer_colour.c b/src/modules/core/producer_colour.c index f7966ed..c1fa168 100644 --- a/src/modules/core/producer_colour.c +++ b/src/modules/core/producer_colour.c @@ -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 )