mlt_profile.c: bugfix string allocation length
authorddennedy <ddennedy@d19143bc-622f-0410-bfdd-b5b2a6649095>
Sun, 29 Jul 2007 03:22:32 +0000 (03:22 +0000)
committerddennedy <ddennedy@d19143bc-622f-0410-bfdd-b5b2a6649095>
Sun, 29 Jul 2007 03:22:32 +0000 (03:22 +0000)
mlt_consumer.c: bugfix removal of property-changed listener

git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@1019 d19143bc-622f-0410-bfdd-b5b2a6649095

src/framework/mlt_consumer.c
src/framework/mlt_profile.c

index f2e653f..0f3264f 100644 (file)
@@ -116,8 +116,7 @@ static void mlt_consumer_property_changed( mlt_service owner, mlt_consumer this,
                mlt_profile_select( mlt_properties_get( properties, "profile" ) );
 
                // Stop listening to this
-               mlt_event_close( g_event_listener );
-               g_event_listener = NULL;
+               mlt_event_block( g_event_listener );
 
                // Apply to properties
                apply_profile_properties( mlt_profile_get(), properties );
index db97909..8d0e071 100644 (file)
@@ -64,7 +64,7 @@ mlt_profile mlt_profile_get( )
 mlt_profile mlt_profile_select( const char *name )
 {
        const char *prefix = PREFIX;
-       char *filename = calloc( 1, strlen( prefix ) + strlen( PROFILES_DIR ) + strlen( name ) + 1 );
+       char *filename = calloc( 1, strlen( prefix ) + strlen( PROFILES_DIR ) + strlen( name ) + 2 );
        strcpy( filename, prefix );
        if ( filename[ strlen( filename ) - 1 ] != '/' )
                filename[ strlen( filename ) ] = '/';