]> git.sesse.net Git - mlt/commitdiff
Wild card filter tracks
authorlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Mon, 31 Jan 2005 14:16:03 +0000 (14:16 +0000)
committerlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Mon, 31 Jan 2005 14:16:03 +0000 (14:16 +0000)
git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@636 d19143bc-622f-0410-bfdd-b5b2a6649095

src/framework/mlt_filter.c
src/framework/mlt_service.c

index 9472cc3477a7eecdb5533497ad8ef73774bb5060..6ca7afb4b960fdf2fb6e32ee81690745ab6d12bd 100644 (file)
@@ -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 )
index a5e6df93b2b57e77a4f614463d8af5c8e50f141f..46197804ae0bc4f355740ff2d5f99d3f5f1409e4 100644 (file)
@@ -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 )