X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fmiracle%2Fmiracle_unit.c;h=4974e387170cbac0110a872ecb9facb96679b2fe;hb=b9998ddda843ad18ad2c8e327523dac4f28ebe1f;hp=5f606e23e56e4b00eb0d37fc0f31254b9173e67f;hpb=bf3264b9e340ba5c11cbf59835a8af3db94e0cc2;p=melted diff --git a/src/miracle/miracle_unit.c b/src/miracle/miracle_unit.c index 5f606e2..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. @@ -593,7 +601,7 @@ void miracle_unit_change_position( miracle_unit unit, int clip, int32_t position else if ( clip >= mlt_playlist_count( playlist ) ) { clip = mlt_playlist_count( playlist ) - 1; - position = LONG_MAX; + position = INT_MAX; } if ( mlt_playlist_get_clip_info( playlist, &info, clip ) == 0 )