]> git.sesse.net Git - mlt/commitdiff
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 93103263b72d778a6285ab59569b3f6511066f9d..b01b0493e071ac3990c5198517d469a56ff388ff 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 db69aa6f83262d7678ad825679ec99aafaa2e68c..3382d1190f8c97c15a0a46f6c134b6c070ee7851 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 df2e7b4e9ef188590684aba4de00d8ab6d201458..53db4764b282e413fa631bad83e806dfa9672e96 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 a4bba69a17b38d13d60300820ebe684f077a3ae5..ddc000c18733950cfee93fbd359c92516783e7fb 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 6e1649ca9d0334dd30c79e0b8586ac87dfb54567..435fdb6c62a94b863c53ff1c36623f172838b13f 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 );
+               }
        }
 }