X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fframework%2Fmlt_multitrack.c;fp=src%2Fframework%2Fmlt_multitrack.c;h=a54a695973c67177de749aac6c6584496f8c5604;hb=8625d866c32e8dd10c58c10b383d26d4d23aab32;hp=24aacc503553f23cfd6557bd455c7d55959e505f;hpb=221df9e782ee929442488b75827341e111cd4254;p=melted diff --git a/src/framework/mlt_multitrack.c b/src/framework/mlt_multitrack.c index 24aacc5..a54a695 100644 --- a/src/framework/mlt_multitrack.c +++ b/src/framework/mlt_multitrack.c @@ -391,14 +391,17 @@ static int producer_get_frame( mlt_producer parent, mlt_frame_ptr frame, int ind // Check if we have a track for this index if ( index < this->count && this->list[ index ] != NULL ) { + // Determine the in point + int in = mlt_producer_is_cut( this->list[ index ]->producer ) ? mlt_producer_get_in( this->list[ index ]->producer ) : 0; + // Get the producer for this track - mlt_producer producer = this->list[ index ]->producer; + mlt_producer producer = mlt_producer_cut_parent( this->list[ index ]->producer ); // Obtain the current position mlt_position position = mlt_producer_frame( parent ); // Make sure we're at the same point - mlt_producer_seek( producer, position ); + mlt_producer_seek( producer, in + position ); // Get the frame from the producer mlt_service_get_frame( mlt_producer_service( producer ), frame, 0 ); @@ -408,6 +411,7 @@ static int producer_get_frame( mlt_producer parent, mlt_frame_ptr frame, int ind double speed = mlt_properties_get_double( producer_properties, "_speed" ); mlt_properties properties = mlt_frame_properties( *frame ); mlt_properties_set_double( properties, "_speed", speed ); + mlt_properties_set_position( properties, "_position", position ); mlt_properties_set_int( properties, "hide", mlt_properties_get_int( mlt_producer_properties( producer ), "hide" ) ); } else