From: ddennedy Date: Tue, 24 Feb 2009 00:46:57 +0000 (+0000) Subject: producer_colour.c: bugfix reading color value after westley has prepended the documen... X-Git-Url: http://research.m1stereo.tv/gitweb?a=commitdiff_plain;h=e20c8745bbc0ce7d5a2a35624632dce49d02b2e4;p=melted producer_colour.c: bugfix reading color value after westley has prepended the document path to the resource property git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@1369 d19143bc-622f-0410-bfdd-b5b2a6649095 --- diff --git a/src/modules/core/producer_colour.c b/src/modules/core/producer_colour.c index a5f3fcd..fc570de 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,9 @@ 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 + char *resource = mlt_properties_get( producer_props, "resource" ); + if ( resource && strchr( resource, '/' ) ) + mlt_properties_set( producer_props, "resource", strrchr( resource, '/' ) + 1 ); rgba_color color = parse_color( now, mlt_properties_get_int( producer_props, "resource" ) ); // See if we need to regenerate