]> git.sesse.net Git - mlt/commitdiff
producer_colour.c: improve previous patch
authorddennedy <ddennedy@d19143bc-622f-0410-bfdd-b5b2a6649095>
Tue, 24 Feb 2009 00:53:50 +0000 (00:53 +0000)
committerddennedy <ddennedy@d19143bc-622f-0410-bfdd-b5b2a6649095>
Tue, 24 Feb 2009 00:53:50 +0000 (00:53 +0000)
git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@1370 d19143bc-622f-0410-bfdd-b5b2a6649095

src/modules/core/producer_colour.c

index fc570de5b7fa541ebbb01a0b055dc29afbe9eb96..ac4200178d5615023385fb159e61efde30d6e043 100644 (file)
@@ -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