From: ddennedy Date: Tue, 24 Feb 2009 00:53:50 +0000 (+0000) Subject: producer_colour.c: improve previous patch X-Git-Url: http://research.m1stereo.tv/gitweb?a=commitdiff_plain;h=e0983d216bc8b3d34225d42761060940d6da4f3c;p=melted producer_colour.c: improve previous patch git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@1370 d19143bc-622f-0410-bfdd-b5b2a6649095 --- diff --git a/src/modules/core/producer_colour.c b/src/modules/core/producer_colour.c index fc570de..ac42001 100644 --- a/src/modules/core/producer_colour.c +++ b/src/modules/core/producer_colour.c @@ -115,9 +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 - char *resource = mlt_properties_get( producer_props, "resource" ); - if ( resource && strchr( resource, '/' ) ) - mlt_properties_set( producer_props, "resource", strrchr( resource, '/' ) + 1 ); + 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