X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=modules%2Faudio_output%2Fjack.c;h=c8345db4a0e325757bc0ec64a0a8179c662c8b81;hb=cdb14e56c12730d6a193f07dcb8e0398215e1fad;hp=e1d10c8f45a4aa71e195c40c4af57d52b0f1a4cf;hpb=806cf5165824be921bf2402ecf11fd3ee6501f9c;p=vlc diff --git a/modules/audio_output/jack.c b/modules/audio_output/jack.c index e1d10c8f45..c8345db4a0 100644 --- a/modules/audio_output/jack.c +++ b/modules/audio_output/jack.c @@ -30,7 +30,12 @@ *****************************************************************************/ #include /* write(), close() */ -#include +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include +#include #include #include @@ -76,16 +81,14 @@ static int Process ( jack_nframes_t i_frames, void *p_arg ); *****************************************************************************/ vlc_module_begin(); set_shortname( "JACK" ); - set_description( _("JACK audio output") ); + 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, VLC_TRUE ); - change_safe(); + AUTO_CONNECT_LONGTEXT, true ); add_string( CONNECT_REGEX_OPTION, NULL, NULL, CONNECT_REGEX_TEXT, - CONNECT_REGEX_LONGTEXT, VLC_TRUE ); - change_safe(); + CONNECT_REGEX_LONGTEXT, true ); set_callbacks( Open, Close ); vlc_module_end(); @@ -105,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; } @@ -140,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; } @@ -149,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; } @@ -212,10 +212,7 @@ static int Open( vlc_object_t *p_this ) psz_out, psz_in ); } } - if( pp_in_ports ) - { - free( pp_in_ports ); - } + free( pp_in_ports ); } msg_Dbg( p_aout, "JACK audio output initialized (%d channels, buffer " @@ -231,14 +228,8 @@ error_out: jack_deactivate( p_sys->p_jack_client ); jack_client_close( p_sys->p_jack_client ); } - if( p_sys->p_jack_ports ) - { - free( p_sys->p_jack_ports ); - } - if( p_sys->p_jack_buffers ) - { - free( p_sys->p_jack_buffers ); - } + free( p_sys->p_jack_ports ); + free( p_sys->p_jack_buffers ); free( p_sys ); } return status;