From f3ad3fee18c6e2e23a33b9715a9e8f2ade7c5d6c Mon Sep 17 00:00:00 2001 From: Dan Dennedy Date: Sun, 25 Sep 2011 13:02:35 -0700 Subject: [PATCH] Fix loading profile from datadir. --- src/framework/Makefile | 2 +- src/framework/mlt_factory.c | 2 +- src/framework/mlt_profile.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/framework/Makefile b/src/framework/Makefile index f7a3b9b8..e487c9aa 100644 --- a/src/framework/Makefile +++ b/src/framework/Makefile @@ -78,7 +78,7 @@ OBJS += ../win32/win32.o SRCS += ../win32/win32.c endif -CFLAGS += $(RDYNAMIC) -DPREFIX="\"$(prefix)\"" -DLIBDIR="\"$(libdir)\"" +CFLAGS += $(RDYNAMIC) -DPREFIX="\"$(prefix)\"" -DLIBDIR="\"$(libdir)\"" -DDATADIR="\"$(datadir)\"" LDFLAGS += $(LIBDL) -lpthread diff --git a/src/framework/mlt_factory.c b/src/framework/mlt_factory.c index bf4a0a0a..76f3f5c6 100644 --- a/src/framework/mlt_factory.c +++ b/src/framework/mlt_factory.c @@ -45,7 +45,7 @@ /** the default subdirectory of the libdir for holding modules (plugins) */ #define PREFIX_LIB LIBDIR "/mlt" /** the default subdirectory of the install prefix for holding module (plugin) data */ -#define PREFIX_DATA PREFIX "/share/mlt" +#define PREFIX_DATA DATADIR "/mlt" #endif /** holds the full path to the modules directory - initialized and retained for the entire session */ diff --git a/src/framework/mlt_profile.c b/src/framework/mlt_profile.c index b8816eea..ce93957e 100644 --- a/src/framework/mlt_profile.c +++ b/src/framework/mlt_profile.c @@ -53,10 +53,10 @@ static mlt_profile mlt_profile_select( const char *name ) { filename = calloc( 1, strlen( name ) + 1 ); } - // Load from $prefix/share/mlt/profiles + // Load from $datadir/mlt/profiles else if ( prefix == NULL ) { - prefix = PREFIX; + prefix = DATADIR; filename = calloc( 1, strlen( prefix ) + strlen( PROFILES_DIR ) + strlen( name ) + 2 ); strcpy( filename, prefix ); if ( filename[ strlen( filename ) - 1 ] != '/' ) @@ -353,7 +353,7 @@ mlt_properties mlt_profile_list( ) const char *wildcard = NULL; int i; - // Load from $prefix/share/mlt/profiles if no env var + // Load from $datadir/mlt/profiles if no env var if ( prefix == NULL ) { prefix = mlt_environment( "MLT_DATA" ); -- 2.39.2