]> git.sesse.net Git - mlt/commitdiff
frei0r/factory.c: apply destructors and serialiser to metadata mlt_properties
authorddennedy <ddennedy@d19143bc-622f-0410-bfdd-b5b2a6649095>
Tue, 4 Mar 2008 07:18:18 +0000 (07:18 +0000)
committerddennedy <ddennedy@d19143bc-622f-0410-bfdd-b5b2a6649095>
Tue, 4 Mar 2008 07:18:18 +0000 (07:18 +0000)
git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@1091 d19143bc-622f-0410-bfdd-b5b2a6649095

src/modules/frei0r/factory.c

index 52eb9bb60e81244d7beb68806ea9b90431ec6c1e..acb7be8db099134c8e09ff680bf431ba36985f1a 100644 (file)
@@ -55,7 +55,7 @@ void fill_param_info ( mlt_repository repository , void* handle, f0r_plugin_info
        mlt_properties metadata = mlt_properties_get_data( this_item_properties , "metadata" , NULL );
        if (!metadata){
                metadata = mlt_properties_new( );
-               mlt_properties_set_data( this_item_properties , "metadata" , metadata , 0 , NULL, NULL );
+               mlt_properties_set_data( this_item_properties , "metadata" , metadata , 0 , ( mlt_destructor )mlt_properties_close, ( mlt_serialiser )mlt_properties_serialise_yaml );
        }
        char descstr[2048];
        snprintf ( descstr, 2048 , "%s (Version: %d.%d)" , info->explanation , info->major_version , info->minor_version );
@@ -68,7 +68,7 @@ void fill_param_info ( mlt_repository repository , void* handle, f0r_plugin_info
        
        if (!parameter){
                parameter = mlt_properties_new ( );
-               mlt_properties_set_data ( metadata , "parameters" , parameter , 0 , NULL, NULL );
+               mlt_properties_set_data ( metadata , "parameters" , parameter , 0 , ( mlt_destructor )mlt_properties_close, NULL );
        }
        
        char numstr[512];
@@ -78,7 +78,7 @@ void fill_param_info ( mlt_repository repository , void* handle, f0r_plugin_info
                mlt_properties pnum = mlt_properties_get_data( metadata , numstr , NULL );
                if (!pnum){
                        pnum = mlt_properties_new ( );
-                       mlt_properties_set_data ( parameter , numstr , pnum , 0 , NULL, NULL );
+                       mlt_properties_set_data ( parameter , numstr , pnum , 0 , ( mlt_destructor )mlt_properties_close, NULL );
                }
                
                f0r_param_info_t paraminfo;
@@ -200,7 +200,7 @@ void * create_frei0r_item ( mlt_profile profile, mlt_service_type type, const ch
        while (dircount--){
                char soname[1024]="";
                
-               char *save_firstptr;
+               char *save_firstptr = NULL;
                char *firstname=strtok_r(strdup(id),".",&save_firstptr);
                
                firstname=strtok_r(NULL,".",&save_firstptr);
@@ -246,7 +246,7 @@ MLT_REPOSITORY
                        strcat(fname,dirname);
                        strcat(fname,shortname);
                        
-                       char *save_firstptr;
+                       char *save_firstptr = NULL;
                        char pluginname[1024]="frei0r.";
                        char* firstname = strtok_r ( shortname , "." , &save_firstptr );
                        strcat(pluginname,firstname);