From: lilo_booter Date: Mon, 31 Jan 2005 14:16:03 +0000 (+0000) Subject: Wild card filter tracks X-Git-Url: http://research.m1stereo.tv/gitweb?a=commitdiff_plain;h=fab74b3d7391168c82a3b0408288a3ae82242ff4;hp=48792e5e48a10b3e8041d09638d50023e0cb9305;p=melted Wild card filter tracks git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@636 d19143bc-622f-0410-bfdd-b5b2a6649095 --- diff --git a/src/framework/mlt_filter.c b/src/framework/mlt_filter.c index 9472cc3..6ca7afb 100644 --- a/src/framework/mlt_filter.c +++ b/src/framework/mlt_filter.c @@ -169,7 +169,7 @@ static int filter_get_frame( mlt_service service, mlt_frame_ptr frame, int index mlt_service producer = mlt_service_producer( &this->parent ); // If the frame request is for this filters track, we need to process it - if ( index == track ) + if ( index == track || track == -1 ) { int ret = mlt_service_get_frame( producer, frame, index ); if ( ret == 0 ) diff --git a/src/framework/mlt_service.c b/src/framework/mlt_service.c index a5e6df9..4619780 100644 --- a/src/framework/mlt_service.c +++ b/src/framework/mlt_service.c @@ -160,6 +160,11 @@ int mlt_service_connect_producer( mlt_service this, mlt_service producer, int in // Get the service base mlt_service_base *base = this->local; + // Special case 'track' index - only works for last filter(s) in a particular chain + // but allows a filter to apply to the output frame regardless of which track it comes from + if ( index == -1 ) + index = 0; + // Check if the producer is already registered with this service for ( i = 0; i < base->count; i ++ ) if ( base->in[ i ] == producer )