X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fframework%2Fmlt_properties.c;h=01c4ba2d9a736a1ed04565d238abe14281ec0b27;hb=ebcbb3571620a43fe24b3f8fa0161096ef628dbe;hp=ab2c206fc70bb7a08bd8047b887efcef8c3bd91d;hpb=529670db145a8731d56a8fc5fc43b8aa480f7f1f;p=melted diff --git a/src/framework/mlt_properties.c b/src/framework/mlt_properties.c index ab2c206..01c4ba2 100644 --- a/src/framework/mlt_properties.c +++ b/src/framework/mlt_properties.c @@ -116,6 +116,7 @@ mlt_properties mlt_properties_load( char *filename ) { // Temp string char temp[ 1024 ]; + char last[ 1024 ] = ""; // Read each string from the file while( fgets( temp, 1024, file ) ) @@ -123,6 +124,19 @@ mlt_properties mlt_properties_load( char *filename ) // Chomp the string temp[ strlen( temp ) - 1 ] = '\0'; + // Check if the line starts with a . + if ( temp[ 0 ] == '.' ) + { + char temp2[ 1024 ]; + sprintf( temp2, "%s%s", last, temp ); + strcpy( temp, temp2 ); + } + else if ( strchr( temp, '=' ) ) + { + strcpy( last, temp ); + *( strchr( last, '=' ) ) = '\0'; + } + // Parse and set the property if ( strcmp( temp, "" ) && temp[ 0 ] != '#' ) mlt_properties_parse( this, temp );