From f8223eabd6120f991f8b264e95fa123b6e20c6e3 Mon Sep 17 00:00:00 2001 From: ddennedy Date: Sun, 29 Jul 2007 03:22:32 +0000 Subject: [PATCH] mlt_profile.c: bugfix string allocation length 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 | 3 +-- src/framework/mlt_profile.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/framework/mlt_consumer.c b/src/framework/mlt_consumer.c index f2e653fd..0f3264fd 100644 --- a/src/framework/mlt_consumer.c +++ b/src/framework/mlt_consumer.c @@ -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 ); diff --git a/src/framework/mlt_profile.c b/src/framework/mlt_profile.c index db97909e..8d0e0712 100644 --- a/src/framework/mlt_profile.c +++ b/src/framework/mlt_profile.c @@ -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 ) ] = '/'; -- 2.39.2