]> git.sesse.net Git - mlt/commitdiff
Fix loading profile from datadir.
authorDan Dennedy <dan@dennedy.org>
Sun, 25 Sep 2011 20:02:35 +0000 (13:02 -0700)
committerDan Dennedy <dan@dennedy.org>
Sun, 25 Sep 2011 20:59:21 +0000 (13:59 -0700)
src/framework/Makefile
src/framework/mlt_factory.c
src/framework/mlt_profile.c

index f7a3b9b85abaa47ab3ba68d9c686912d64540686..e487c9aa7d52b2454d8b57df5fa6e6de001ff995 100644 (file)
@@ -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
 
index bf4a0a0ad4d8a2b48af14e3b50f7b6a1bb05f386..76f3f5c620f087976a16901c297cfc20f1d4add8 100644 (file)
@@ -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 */
index b8816eeab9311591588177d0547db9bf55fb43ba..ce93957efff8cee242fb30fa10fdf474dad4fee7 100644 (file)
@@ -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" );