Corrections after valgrinding
authorlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Fri, 31 Dec 2004 12:18:26 +0000 (12:18 +0000)
committerlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Fri, 31 Dec 2004 12:18:26 +0000 (12:18 +0000)
git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@597 d19143bc-622f-0410-bfdd-b5b2a6649095

demo/demo.ini
src/framework/mlt_producer.c
src/framework/mlt_properties.c
src/framework/mlt_property.c
src/framework/mlt_transition.c

index 9310326..b01b049 100644 (file)
@@ -16,7 +16,7 @@ mlt_title_over_gfx                    Title over graphic                                      watermark1.png,clip1.dv
 mlt_slideshow                          Slideshow                                                       Scotland
 mlt_bouncy                                     Bouncy, Bouncy                                          clip1.dv,clip3.dv
 mlt_bouncy_ball                                Bouncy, Bouncy Ball                                     clip1.mpeg,clip3.mpeg,circle.png
-mlt_news                                       Breaking News                                           clip1.mpeg,clip2.mpeg
+mlt_news                                       Breaking News                                           clip1.dv,clip2.dv
 mlt_squeeze                                    Squeeze Transitions                                     clip1.dv,clip2.dv,clip3.dv
 mlt_squeeze_box                                Squeeze Box                                                     clip1.dv,clip2.dv,clip3.dv
 mlt_jcut                                       J Cut                                                           clip1.dv,clip2.dv
index db69aa6..3382d11 100644 (file)
@@ -837,6 +837,8 @@ void mlt_producer_close( mlt_producer this )
                }
                else
                {
+                       int destroy = mlt_producer_is_cut( this );
+
 #if _MLT_PRODUCER_CHECKS_ == 1
                        // Show debug info
                        mlt_properties_debug( MLT_PRODUCER_PROPERTIES( this ), "Producer closing", stderr );
@@ -851,6 +853,9 @@ void mlt_producer_close( mlt_producer this )
 #endif
 
                        mlt_service_close( &this->parent );
+
+                       if ( destroy )
+                               free( this );
                }
        }
 }
index df2e7b4..53db476 100644 (file)
@@ -346,7 +346,16 @@ int mlt_properties_set( mlt_properties this, char *name, char *value )
        mlt_property property = mlt_properties_fetch( this, name );
 
        // Set it if not NULL
-       if ( property != NULL && ( value == NULL || value[ 0 ] != '@' ) )
+       if ( property == NULL )
+       {
+               fprintf( stderr, "Whoops\n" );
+       }
+       else if ( value == NULL )
+       {
+               error = mlt_property_set_string( property, value );
+               mlt_properties_do_mirror( this, name );
+       }
+       else if ( *value != '@' )
        {
                error = mlt_property_set_string( property, value );
                mlt_properties_do_mirror( this, name );
index a4bba69..ddc000c 100644 (file)
@@ -112,10 +112,17 @@ int mlt_property_set_position( mlt_property this, mlt_position value )
 
 int mlt_property_set_string( mlt_property this, char *value )
 {
-       mlt_property_clear( this );
-       this->types = mlt_prop_string;
-       if ( value != NULL )
-               this->prop_string = strdup( value );
+       if ( value != this->prop_string )
+       {
+               mlt_property_clear( this );
+               this->types = mlt_prop_string;
+               if ( value != NULL )
+                       this->prop_string = strdup( value );
+       }
+       else
+       {
+               this->types = mlt_prop_string;
+       }
        return this->prop_string == NULL;
 }
 
index 6e1649c..435fdb6 100644 (file)
@@ -253,8 +253,13 @@ void mlt_transition_close( mlt_transition this )
        {
                this->parent.close = NULL;
                if ( this->close != NULL )
+               {
                        this->close( this );
+               }
                else
+               {
                        mlt_service_close( &this->parent );
+                       free( this );
+               }
        }
 }