X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fframework%2Fmlt_producer.c;h=89d81cd12586720af3142f3329dad9e93ba176d6;hb=9ad7cb6cdea367db7a720fa0335f8b8eccf0ae09;hp=98498c459214fa9ba778a2fa0c577f54a71660bb;hpb=42ed8e7a15a5e2ba693c644e73948ff6ffb0fed4;p=melted diff --git a/src/framework/mlt_producer.c b/src/framework/mlt_producer.c index 98498c4..89d81cd 100644 --- a/src/framework/mlt_producer.c +++ b/src/framework/mlt_producer.c @@ -442,10 +442,15 @@ static int producer_get_frame( mlt_service service, mlt_frame_ptr frame, int ind char key[ 25 ]; sprintf( key, "_clone.%d", clone_index - 1 ); clone = mlt_properties_get_data( mlt_producer_properties( mlt_producer_cut_parent( this ) ), key, NULL ); + if ( clone == NULL ) fprintf( stderr, "requested clone doesn't exist\n" ); clone = clone == NULL ? this : clone; } - mlt_producer_seek( clone, mlt_properties_get_int( properties, "_position" ) ); - result = producer_get_frame( mlt_producer_service( mlt_producer_cut_parent( clone ) ), frame, index ); + else + { + clone = mlt_producer_cut_parent( this ); + } + mlt_producer_seek( clone, mlt_producer_get_in( this ) + mlt_properties_get_int( properties, "_position" ) ); + result = producer_get_frame( mlt_producer_service( clone ), frame, index ); double speed = mlt_producer_get_speed( this ); mlt_properties_set_double( mlt_frame_properties( *frame ), "_speed", speed ); mlt_producer_prepare_next( clone ); @@ -503,6 +508,9 @@ static mlt_producer mlt_producer_clone( mlt_producer this ) if ( clone == NULL && resource != NULL ) clone = mlt_factory_producer( "fezzik", resource ); + if ( clone != NULL ) + mlt_properties_inherit( mlt_producer_properties( clone ), properties ); + return clone; }