X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fmodules%2Fwestley%2Fconsumer_westley.c;h=8bf93c9a538aff754889ccb12e83bbdd1e79ed2d;hb=421997fe7b5ef0735d706c3976ef90fa5b65bd99;hp=87ab12dfcb0eb18534014f455df47f09e4a6b330;hpb=f00476101550ec7d8e863f6516aa83bc1b524570;p=melted diff --git a/src/modules/westley/consumer_westley.c b/src/modules/westley/consumer_westley.c index 87ab12d..8bf93c9 100644 --- a/src/modules/westley/consumer_westley.c +++ b/src/modules/westley/consumer_westley.c @@ -189,12 +189,10 @@ static void serialise_properties( serialise_context context, mlt_properties prop strcmp( name, "height" ) != 0 ) { char *value = mlt_properties_get_value( properties, i ); - p = xmlNewChild( node, NULL, "property", NULL ); - xmlNewProp( p, "name", mlt_properties_get_name( properties, i ) ); if ( strcmp( context->root, "" ) && !strncmp( value, context->root, strlen( context->root ) ) ) - xmlNodeSetContent( p, value + strlen( context->root ) + 1 ); - else - xmlNodeSetContent( p, value ); + value += strlen( context->root ) + 1; + p = xmlNewTextChild( node, NULL, "property", value ); + xmlNewProp( p, "name", name ); } } } @@ -213,12 +211,10 @@ static void serialise_store_properties( serialise_context context, mlt_propertie char *value = mlt_properties_get_value( properties, i ); if ( value != NULL ) { - p = xmlNewChild( node, NULL, "property", NULL ); - xmlNewProp( p, "name", mlt_properties_get_name( properties, i ) ); - if ( context->root != NULL && strcmp( context->root, "" ) && !strncmp( value, context->root, strlen( context->root ) ) ) - xmlNodeSetContent( p, value + strlen( context->root ) + 1 ); - else - xmlNodeSetContent( p, value ); + if ( strcmp( context->root, "" ) && !strncmp( value, context->root, strlen( context->root ) ) ) + value += strlen( context->root ) + 1; + p = xmlNewTextChild( node, NULL, "property", value ); + xmlNewProp( p, "name", name ); } } } @@ -704,13 +700,13 @@ static int consumer_start( mlt_consumer this ) { xmlChar *buffer = NULL; int length = 0; - xmlDocDumpMemory( doc, &buffer, &length ); + xmlDocDumpMemoryEnc( doc, &buffer, &length, "utf-8" ); mlt_properties_set( properties, resource, buffer ); xmlFree( buffer ); } else { - xmlSaveFormatFile( resource, doc, 1 ); + xmlSaveFormatFileEnc( resource, doc, "utf-8", 1 ); } // Close the document