]> git.sesse.net Git - mlt/blobdiff - src/modules/core/producer_colour.c
producer_colour.c: bugfix reading color value after westley has prepended the documen...
[mlt] / src / modules / core / producer_colour.c
index a5f3fcdc2961727a21bd28d4bcde41d42db20237..fc570de5b7fa541ebbb01a0b055dc29afbe9eb96 100644 (file)
@@ -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