]> git.sesse.net Git - vlc/blobdiff - modules/audio_output/jack.c
Fix compilation on win32.
[vlc] / modules / audio_output / jack.c
index 41e79dd42d5c26e43b9933946de9e2921ff0021f..b15bbfab88a5a5f0c8e3cb5802b82800076d3807 100644 (file)
@@ -34,7 +34,7 @@
 # include "config.h"
 #endif
 
-#include <vlc/vlc.h>
+#include <vlc_common.h>
 #include <vlc_plugin.h>
 #include <vlc_aout.h>
 
@@ -79,18 +79,18 @@ static int  Process      ( jack_nframes_t i_frames, void *p_arg );
 /*****************************************************************************
  * Module descriptor
  *****************************************************************************/
-vlc_module_begin();
-    set_shortname( "JACK" );
-    set_description( N_("JACK audio output") );
-    set_capability( "audio output", 100 );
-    set_category( CAT_AUDIO );
-    set_subcategory( SUBCAT_AUDIO_AOUT );
+vlc_module_begin ()
+    set_shortname( "JACK" )
+    set_description( N_("JACK audio output") )
+    set_capability( "audio output", 100 )
+    set_category( CAT_AUDIO )
+    set_subcategory( SUBCAT_AUDIO_AOUT )
     add_bool( AUTO_CONNECT_OPTION, 0, NULL, AUTO_CONNECT_TEXT,
               AUTO_CONNECT_LONGTEXT, true );
     add_string( CONNECT_REGEX_OPTION, NULL, NULL, CONNECT_REGEX_TEXT,
                 CONNECT_REGEX_LONGTEXT, true );
-    set_callbacks( Open, Close );
-vlc_module_end();
+    set_callbacks( Open, Close )
+vlc_module_end ()
 
 /*****************************************************************************
  * Open: create a JACK client
@@ -108,7 +108,6 @@ static int Open( vlc_object_t *p_this )
     p_sys = calloc( 1, sizeof( aout_sys_t ) );
     if( p_sys == NULL )
     {
-        msg_Err( p_aout, "out of memory" );
         status = VLC_ENOMEM;
         goto error_out;
     }
@@ -143,7 +142,6 @@ static int Open( vlc_object_t *p_this )
                                   sizeof(jack_port_t *) );
     if( p_sys->p_jack_ports == NULL )
     {
-        msg_Err( p_aout, "out of memory" );
         status = VLC_ENOMEM;
         goto error_out;
     }
@@ -152,7 +150,6 @@ static int Open( vlc_object_t *p_this )
                                     sizeof(jack_sample_t *) );
     if( p_sys->p_jack_buffers == NULL )
     {
-        msg_Err( p_aout, "out of memory" );
         status = VLC_ENOMEM;
         goto error_out;
     }
@@ -190,6 +187,7 @@ static int Open( vlc_object_t *p_this )
         const char **pp_in_ports = jack_get_ports( p_sys->p_jack_client,
                                                    psz_regex, NULL,
                                                    JackPortIsInput );
+        free( psz_regex );
         /* Count the number of returned ports */
         i_in_ports = 0;
         while( pp_in_ports && pp_in_ports[i_in_ports] )