X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=mlt%2Fsrc%2Fframework%2Fmlt_tractor.c;h=8d6247d40d1ca2c76ee1f33586bb0c104d3444a2;hb=6336039a203c6496691784682f9ad56eb13abcc3;hp=6c02230f2548e5a9d4cf79ae141f3086ba0b112e;hpb=510ad0d31115a6a1522911c38555a32d8b0d3945;p=melted diff --git a/mlt/src/framework/mlt_tractor.c b/mlt/src/framework/mlt_tractor.c index 6c02230..8d6247d 100644 --- a/mlt/src/framework/mlt_tractor.c +++ b/mlt/src/framework/mlt_tractor.c @@ -118,7 +118,7 @@ static int producer_get_frame( mlt_producer parent, mlt_frame_ptr frame, int tra int i = 0; int looking = 1; int done = 0; - mlt_frame temp; + mlt_frame temp = NULL; // Get the properties of the parent producer mlt_properties properties = mlt_producer_properties( parent ); @@ -154,7 +154,13 @@ static int producer_get_frame( mlt_producer parent, mlt_frame_ptr frame, int tra // Use this as output if we don't have one already *frame = temp; } - else if ( !mlt_frame_is_test_card( temp ) && looking ) + else if ( ( !mlt_frame_is_test_card( temp ) || !mlt_frame_is_test_audio( temp ) ) && + mlt_producer_frame( parent ) == mlt_properties_get_position( mlt_frame_properties( temp ), "position" ) ) + { + *frame = temp; + looking = 0; + } + else if ( ( !mlt_frame_is_test_card( temp ) || !mlt_frame_is_test_audio( temp ) ) && looking ) { // This is the one we want and we can stop looking *frame = temp;