framework/mlt_frame.c
[melted] / src / modules / core / producer_colour.c
index f7966ed..c2f645b 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 )
@@ -198,9 +199,6 @@ static int producer_get_frame( mlt_producer producer, mlt_frame_ptr frame, int i
                // Obtain properties of producer
                mlt_properties producer_props = MLT_PRODUCER_PROPERTIES( producer );
 
-               // Determine if we're producing PAL or NTSC
-               int is_pal = mlt_properties_get_double( producer_props, "fps" ) == 25.0;
-
                // Set the producer on the frame properties
                mlt_properties_set_data( properties, "producer_colour", producer, 0, NULL, NULL );
 
@@ -209,7 +207,7 @@ static int producer_get_frame( mlt_producer producer, mlt_frame_ptr frame, int i
 
                // Set producer-specific frame properties
                mlt_properties_set_int( properties, "progressive", 1 );
-               mlt_properties_set_double( properties, "aspect_ratio", is_pal ? 59.0/54.0 : 10.0/11.0 );
+               mlt_properties_set_double( properties, "aspect_ratio", 0 );
 
                // colour is an alias for resource
                if ( mlt_properties_get( producer_props, "colour" ) != NULL )