#include <stdio.h>
#include <ctype.h>
#include <unistd.h>
-#include <locale.h>
#include <libxml/parser.h>
#include <libxml/parserInternals.h> // for xmlCreateFileParserCtxt
mlt_properties params;
mlt_profile profile;
int pass;
+ char *lc_numeric;
};
typedef struct deserialise_context_s *deserialise_context;
mlt_properties properties = MLT_SERVICE_PROPERTIES( service );
track_service( context->destructors, service, (mlt_destructor) mlt_tractor_close );
+ mlt_properties_set_lcnumeric( MLT_SERVICE_PROPERTIES( service ), context->lc_numeric );
for ( ; atts != NULL && *atts != NULL; atts += 2 )
mlt_properties_set( MLT_SERVICE_PROPERTIES( service ), (const char*) atts[0], atts[1] == NULL ? "" : (const char*) atts[1] );
tractor = mlt_tractor_new( );
parent = MLT_TRACTOR_SERVICE( tractor );
track_service( context->destructors, parent, (mlt_destructor) mlt_tractor_close );
+ mlt_properties_set_lcnumeric( MLT_SERVICE_PROPERTIES( parent ), context->lc_numeric );
type = mlt_tractor_type;
// Flag it as a synthesised tractor for clean up later
// Track this producer
track_service( context->destructors, producer, (mlt_destructor) mlt_producer_close );
+ mlt_properties_set_lcnumeric( MLT_SERVICE_PROPERTIES( producer ), context->lc_numeric );
// Propogate the properties
qualify_property( context, properties, "resource" );
mlt_properties filter_props = MLT_SERVICE_PROPERTIES( filter );
track_service( context->destructors, filter, (mlt_destructor) mlt_filter_close );
+ mlt_properties_set_lcnumeric( MLT_SERVICE_PROPERTIES( filter ), context->lc_numeric );
// Propogate the properties
qualify_property( context, properties, "resource" );
mlt_properties effect_props = MLT_SERVICE_PROPERTIES( effect );
track_service( context->destructors, effect, (mlt_destructor) mlt_transition_close );
+ mlt_properties_set_lcnumeric( MLT_SERVICE_PROPERTIES( effect ), context->lc_numeric );
// Propogate the properties
qualify_property( context, properties, "resource" );
{
if ( xmlStrcmp( atts[0], _x("LC_NUMERIC") ) )
mlt_properties_set( context->producer_map, _s( atts[0] ), _s(atts[1] ) );
- else
- setlocale( LC_NUMERIC, _s( atts[1] ) );
+ else if ( !context->lc_numeric )
+ context->lc_numeric = strdup( _s( atts[1] ) );
}
}
}
if ( context->params != NULL )
mlt_properties_close( context->params );
mlt_properties_close( context->destructors );
+ if ( context->lc_numeric )
+ free( context->lc_numeric );
free( context );
free( filename );