static void *consumer_thread( void *arg );
static void serialise_service( serialise_context context, mlt_service service, xmlNode *node );
-static void* filter_restricted( const char *in )
+static char* filter_restricted( const char *in )
{
if ( !in ) return NULL;
size_t n = strlen( in );
if ( value )
{
int rootlen = strlen( context->root );
+ // convert absolute path to relative
if ( rootlen && !strncmp( value, context->root, rootlen ) && value[ rootlen ] == '/' )
- value += rootlen + 1;
- p = xmlNewTextChild( node, NULL, _x("property"), _x(value) );
+ p = xmlNewTextChild( node, NULL, _x("property"), _x(value + rootlen + 1 ) );
+ else
+ p = xmlNewTextChild( node, NULL, _x("property"), _x(value) );
xmlNewProp( p, _x("name"), _x(name) );
free( value );
}
if ( value )
{
int rootlen = strlen( context->root );
+ // convert absolute path to relative
if ( rootlen && !strncmp( value, context->root, rootlen ) && value[ rootlen ] == '/' )
- value += rootlen + 1;
- p = xmlNewTextChild( node, NULL, _x("property"), _x(value) );
+ p = xmlNewTextChild( node, NULL, _x("property"), _x(value + rootlen + 1) );
+ else
+ p = xmlNewTextChild( node, NULL, _x("property"), _x(value) );
xmlNewProp( p, _x("name"), _x(name) );
free( value );
}