doc updates and better control of pixbuf composite property propogation
[melted] / src / modules / gtk2 / producer_pixbuf.c
index 3bfe553..84ed6e6 100644 (file)
@@ -217,9 +217,12 @@ static int producer_get_frame( mlt_producer producer, mlt_frame_ptr frame, int i
                mlt_properties_set_int( properties, "height", this->height );
 
                // Set the compositing properties
-               mlt_properties_set_int( properties, "x", mlt_properties_get_int( producer_props, "x" ) );
-               mlt_properties_set_int( properties, "y", mlt_properties_get_int( producer_props, "y" ) );
-               mlt_properties_set_double( properties, "mix",  mlt_properties_get_double( producer_props, "mix" ) );
+               if ( mlt_properties_get( producer_props, "x" ) != NULL )
+                       mlt_properties_set_int( properties, "x", mlt_properties_get_int( producer_props, "x" ) );
+               if ( mlt_properties_get( producer_props, "y" ) != NULL )
+                       mlt_properties_set_int( properties, "y", mlt_properties_get_int( producer_props, "y" ) );
+               if ( mlt_properties_get( producer_props, "mix" ) != NULL )
+                       mlt_properties_set_double( properties, "mix",  mlt_properties_get_double( producer_props, "mix" ) );
 
                // if picture sequence pass the image and alpha data without destructor
                mlt_properties_set_data( properties, "image", this->image, 0, NULL, NULL );
@@ -301,9 +304,12 @@ static int producer_get_frame( mlt_producer producer, mlt_frame_ptr frame, int i
                mlt_properties_set_int( properties, "height", this->height );
 
                // Set the compositing properties
-               mlt_properties_set_int( properties, "x", mlt_properties_get_int( producer_props, "x" ) );
-               mlt_properties_set_int( properties, "y", mlt_properties_get_int( producer_props, "y" ) );
-               mlt_properties_set_double( properties, "mix",  mlt_properties_get_double( producer_props, "mix" ) );
+               if ( mlt_properties_get( producer_props, "x" ) != NULL )
+                       mlt_properties_set_int( properties, "x", mlt_properties_get_int( producer_props, "x" ) );
+               if ( mlt_properties_get( producer_props, "y" ) != NULL )
+                       mlt_properties_set_int( properties, "y", mlt_properties_get_int( producer_props, "y" ) );
+               if ( mlt_properties_get( producer_props, "mix" ) != NULL )
+                       mlt_properties_set_double( properties, "mix",  mlt_properties_get_double( producer_props, "mix" ) );
 
                // Pass alpha and image on properties with or without destructor
                this->image = image;