Mutable shapes on regions
authorlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Tue, 3 Aug 2004 17:50:49 +0000 (17:50 +0000)
committerlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Tue, 3 Aug 2004 17:50:49 +0000 (17:50 +0000)
git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@351 d19143bc-622f-0410-bfdd-b5b2a6649095

src/modules/core/filter_watermark.c
src/modules/core/transition_region.c

index f23ac60..afe036e 100644 (file)
@@ -53,7 +53,7 @@ static int filter_get_image( mlt_frame frame, uint8_t **image, mlt_image_format
        char *resource = mlt_properties_get( properties, "resource" );
 
        // Get the old resource
-       char *old_resource = mlt_properties_get( properties, "old_resource" );
+       char *old_resource = mlt_properties_get( properties, "_old_resource" );
 
        // Create a composite if we don't have one
        if ( composite == NULL )
@@ -95,7 +95,7 @@ static int filter_get_image( mlt_frame frame, uint8_t **image, mlt_image_format
                        mlt_properties_set( mlt_producer_properties( producer ), "eof", "loop" );
 
                        // Set the old resource
-                       mlt_properties_set( properties, "old_resource", resource );
+                       mlt_properties_set( properties, "_old_resource", resource );
                }
        }
 
index a4b4cab..2cbc978 100644 (file)
@@ -245,6 +245,9 @@ static int transition_get_image( mlt_frame frame, uint8_t **image, mlt_image_for
                // Get the resource of this filter (could be a shape [rectangle/circle] or an alpha provider of choice
                char *resource =  mlt_properties_get( properties, "resource" );
 
+               // Get the old resource in case it's changed
+               char *old_resource =  mlt_properties_get( properties, "_old_resource" );
+
                // String to hold the filter to query on
                char id[ 256 ];
 
@@ -288,11 +291,14 @@ static int transition_get_image( mlt_frame frame, uint8_t **image, mlt_image_for
                        mlt_producer producer = mlt_properties_get_data( properties, "producer", NULL );
 
                        // If We have no producer then create one
-                       if ( producer == NULL )
+                       if ( producer == NULL || ( old_resource != NULL && strcmp( resource, old_resource ) ) )
                        {
                                // Get the factory producer service
                                char *factory = mlt_properties_get( properties, "factory" );
 
+                               // Store the old resource
+                               mlt_properties_set( properties, "_old_resource", resource );
+
                                // Special case circle resource
                                if ( strcmp( resource, "circle" ) == 0 )
                                {