From e20c8745bbc0ce7d5a2a35624632dce49d02b2e4 Mon Sep 17 00:00:00 2001 From: ddennedy Date: Tue, 24 Feb 2009 00:46:57 +0000 Subject: [PATCH] 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 --- src/modules/core/producer_colour.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) 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 -- 1.7.4.4