Allow filter attachment to clip
authorlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Mon, 4 Oct 2004 06:13:32 +0000 (06:13 +0000)
committerlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Mon, 4 Oct 2004 06:13:32 +0000 (06:13 +0000)
git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@459 d19143bc-622f-0410-bfdd-b5b2a6649095

src/modules/inigo/producer_inigo.c

index ad811f4..31368cb 100644 (file)
@@ -147,9 +147,13 @@ mlt_producer producer_inigo_init( char **argv )
                        if ( group != NULL )
                                properties = group;
                }
-               else if ( !strcmp( argv[ i ], "-attach" ) || !strcmp( argv[ i ], "-attach-cut" ) )
+               else if ( !strcmp( argv[ i ], "-attach" ) || 
+                                 !strcmp( argv[ i ], "-attach-cut" ) ||
+                                 !strcmp( argv[ i ], "-attach-clip" ) )
                {
-                       int type = !strcmp( argv[ i ], "-attach" ) ? 0 : 1;
+                       int type = !strcmp( argv[ i ], "-attach" ) ? 0 : 
+                                          !strcmp( argv[ i ], "-attach-cut" ) ? 1 : 
+                                          2;
                        mlt_filter filter = create_attach( field, argv[ ++ i ], track );
                        if ( producer != NULL && !mlt_producer_is_cut( producer ) )
                        {
@@ -159,7 +163,7 @@ mlt_producer producer_inigo_init( char **argv )
                                producer = info.cut;
                        }
 
-                       if ( type == 1 )
+                       if ( type == 1 || type == 2 )
                        {
                                mlt_playlist_clip_info info;
                                mlt_playlist_get_clip_info( playlist, &info, mlt_playlist_count( playlist ) - 1 );
@@ -170,8 +174,10 @@ mlt_producer producer_inigo_init( char **argv )
                        {
                                if ( type == 0 )
                                        mlt_service_attach( ( mlt_service )properties, filter );
-                               else
+                               else if ( type == 1 )
                                        mlt_service_attach( ( mlt_service )producer, filter );
+                               else if ( type == 2 )
+                                       mlt_service_attach( ( mlt_service )mlt_producer_cut_parent( producer ), filter );
 
                                properties = mlt_filter_properties( filter );
                                mlt_properties_inherit( properties, group );