]> git.sesse.net Git - mlt/commitdiff
register jack ports before activating client
authoreddrog <eddrog@users.sourceforge.net>
Sat, 27 Oct 2012 11:54:39 +0000 (13:54 +0200)
committereddrog <eddrog@users.sourceforge.net>
Sat, 27 Oct 2012 11:54:39 +0000 (13:54 +0200)
this is the order it should be done. Otherwise there is a problem
if other jack clients (e.g ardour) is already running and you want to
start mlt jack (registering ports fail)

src/modules/jackrack/filter_jackrack.c

index 49eaf9431396c3b3f45143565a22c21226ecb317..0e6a114bbb10af6f1383f1ea77b233467c15d6b0 100644 (file)
@@ -166,11 +166,6 @@ static void initialise_jack_ports( mlt_properties properties )
                sizeof( float *) * channels, mlt_pool_release, NULL );
        mlt_properties_set_data( properties, "jack_input_buffers", jack_input_buffers,
                sizeof( float *) * channels, mlt_pool_release, NULL );
-
-       // Start Jack processing - required before registering ports
-       pthread_mutex_lock( &g_activate_mutex );
-       jack_activate( jack_client );
-       pthread_mutex_unlock( &g_activate_mutex  );
        
        // Register Jack ports
        for ( i = 0; i < channels; i++ )
@@ -196,6 +191,11 @@ static void initialise_jack_ports( mlt_properties properties )
                }
        }
        
+       // Start Jack processing - required before registering ports
+       pthread_mutex_lock( &g_activate_mutex );
+       jack_activate( jack_client );
+       pthread_mutex_unlock( &g_activate_mutex  );
+
        // Establish connections
        for ( i = 0; i < channels; i++ )
        {