X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fmiracle%2Fmiracle_unit.c;h=4974e387170cbac0110a872ecb9facb96679b2fe;hb=ee523db03a44cbda4b5def55e0c36427ab6a0747;hp=c9471d34191361bf3a8ec39c01c8767bac266056;hpb=6fbad87cfc97a367c4e47216b83c9e433253aa9e;p=melted diff --git a/src/miracle/miracle_unit.c b/src/miracle/miracle_unit.c index c9471d3..4974e38 100644 --- a/src/miracle/miracle_unit.c +++ b/src/miracle/miracle_unit.c @@ -62,7 +62,7 @@ miracle_unit miracle_unit_init( int index, char *constructor ) if ( arg != NULL ) *arg ++ = '\0'; - consumer = mlt_factory_consumer( id, arg ); + consumer = mlt_factory_consumer( NULL, id, arg ); if ( consumer != NULL ) { @@ -146,7 +146,15 @@ void miracle_unit_set_notifier( miracle_unit this, valerie_notifier notifier, ch static mlt_producer locate_producer( miracle_unit unit, char *file ) { - return mlt_factory_producer( "fezzik", file ); + // Try to get the profile from the consumer + mlt_consumer consumer = mlt_properties_get_data( unit->properties, "consumer", NULL ); + mlt_profile profile = NULL; + + if ( consumer != NULL ) + { + profile = mlt_service_profile( MLT_CONSUMER_SERVICE( consumer ) ); + } + return mlt_factory_producer( profile, "fezzik", file ); } /** Update the generation count.