X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fmodules%2Fcore%2Fproducer_colour.c;h=ac4200178d5615023385fb159e61efde30d6e043;hb=bcbe5ecf7001335895da8be92518f4645977a839;hp=a5f3fcdc2961727a21bd28d4bcde41d42db20237;hpb=7e17e31f4c57e6a3560d3d5a29594f3d08edfd46;p=melted diff --git a/src/modules/core/producer_colour.c b/src/modules/core/producer_colour.c index a5f3fcd..ac42001 100644 --- a/src/modules/core/producer_colour.c +++ b/src/modules/core/producer_colour.c @@ -62,9 +62,6 @@ rgba_color parse_color( char *color, unsigned int color_int ) { rgba_color result = { 0xff, 0xff, 0xff, 0xff }; - if ( strchr( color, '/' ) ) - color = strrchr( color, '/' ) + 1; - if ( !strcmp( color, "red" ) ) { result.r = 0xff; @@ -118,6 +115,11 @@ static int producer_get_image( mlt_frame frame, uint8_t **buffer, mlt_image_form int current_height = mlt_properties_get_int( producer_props, "_height" ); // Parse the colour + if ( now && strchr( now, '/' ) ) + { + now = strrchr( now, '/' ) + 1; + mlt_properties_set( producer_props, "resource", now ); + } rgba_color color = parse_color( now, mlt_properties_get_int( producer_props, "resource" ) ); // See if we need to regenerate