From 5ed293de635b4129d5245c73a90b448a2f79ab24 Mon Sep 17 00:00:00 2001 From: ddennedy Date: Sat, 20 Dec 2008 06:22:56 +0000 Subject: [PATCH] producer_consumer.c: set our length from the length of the nested producer so we can terminate at the end of rendering. git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@1278 d19143bc-622f-0410-bfdd-b5b2a6649095 --- src/modules/core/producer_consumer.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/modules/core/producer_consumer.c b/src/modules/core/producer_consumer.c index ec575a2..c079a9a 100644 --- a/src/modules/core/producer_consumer.c +++ b/src/modules/core/producer_consumer.c @@ -123,7 +123,7 @@ static int get_frame( mlt_producer this, mlt_frame_ptr frame, int index ) double actual_position = mlt_producer_get_speed( this ) * (double)mlt_producer_position( this ); mlt_position need_first = floor( actual_position ); mlt_producer_seek( cx->producer, need_first ); - + // Get the nested frame mlt_frame nested_frame = mlt_consumer_rt_frame( cx->consumer ); @@ -188,8 +188,10 @@ mlt_producer producer_consumer_init( mlt_profile profile, mlt_service_type type, // Get the properties of this producer mlt_properties properties = MLT_PRODUCER_PROPERTIES( this ); mlt_properties_set( properties, "resource", arg ); + mlt_properties_pass_list( properties, MLT_PRODUCER_PROPERTIES( real_producer ), "out, length" ); - mlt_producer_close( real_producer ); + // Done with the producer - will re-open later when we have the profile property + mlt_producer_close( real_producer ); } else { -- 1.7.4.4