]> git.sesse.net Git - mlt/commitdiff
producer_xml: fix proper initialization of consumer
authorDan Dennedy <dan@dennedy.org>
Sat, 10 Nov 2012 18:26:53 +0000 (10:26 -0800)
committerDan Dennedy <dan@dennedy.org>
Sat, 10 Nov 2012 18:26:53 +0000 (10:26 -0800)
src/modules/xml/producer_xml.c

index 2984421394c42b2dee332dc0a357c31fb64cd253..5f197d16c73c2e1cacae3ca8fecc38f9ba581883 100644 (file)
@@ -1069,11 +1069,12 @@ static void on_start_consumer( deserialise_context context, const xmlChar *name,
 {
        if ( context->pass == 1 )
        {
-               mlt_consumer consumer = mlt_consumer_new( context->profile );
-               mlt_properties properties = MLT_CONSUMER_PROPERTIES( consumer );
+               mlt_service service = calloc( 1, sizeof( struct mlt_service_s ) );
+               mlt_service_init( service, NULL );
+               mlt_properties properties = MLT_SERVICE_PROPERTIES( service );
 
                mlt_properties_set_lcnumeric( properties, context->lc_numeric );
-               context_push_service( context, MLT_CONSUMER_SERVICE(consumer), mlt_dummy_consumer_type );
+               context_push_service( context, service, mlt_dummy_consumer_type );
 
                // Set the properties from attributes
                for ( ; atts != NULL && *atts != NULL; atts += 2 )