]> git.sesse.net Git - mlt/blobdiff - src/framework/mlt_properties.c
Fix and cleanup profile and preset dirs.
[mlt] / src / framework / mlt_properties.c
index 39b1339f629abad394c12b12b299f03e3989884c..c381e239a0828a97ed3bbe94ecb74f9f4043d186 100644 (file)
@@ -40,6 +40,8 @@
 #include <errno.h>
 #include <locale.h>
 
+#define PRESETS_DIR "/presets"
+
 /** \brief private implementation of the property list */
 
 typedef struct
@@ -285,9 +287,9 @@ int mlt_properties_preset( mlt_properties self, const char *name )
                }
                else
                {
-                       data = malloc( strlen( mlt_environment( "MLT_DATA" ) ) + 9 );
+                       data = malloc( strlen( mlt_environment( "MLT_DATA" ) ) + strlen( PRESETS_DIR ) + 1 );
                        strcpy( data, mlt_environment( "MLT_DATA" ) );
-                       strcat( data, "/presets" );
+                       strcat( data, PRESETS_DIR );
                }
                if ( data && type && service )
                {