X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=modules%2Faudio_output%2Fesd.c;h=b56b99cb9890facf6927a0e228a3700306096683;hb=66a8a1a8fe1f9e7e1b1d39b23b756d10be31109a;hp=5fca9c9dfab7403ab1ff4776bb88643340e8fcdd;hpb=4f028428053d0342c55deb6ba8b8da114c6a0caa;p=vlc diff --git a/modules/audio_output/esd.c b/modules/audio_output/esd.c index 5fca9c9dfa..b56b99cb98 100644 --- a/modules/audio_output/esd.c +++ b/modules/audio_output/esd.c @@ -27,7 +27,12 @@ #include /* ENOMEM */ #include /* write(), close() */ -#include +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include +#include #include #include @@ -62,10 +67,10 @@ static void Play ( aout_instance_t * ); * Module descriptor *****************************************************************************/ vlc_module_begin(); - set_description( _("EsounD audio output") ); + set_description( N_("EsounD audio output") ); set_shortname( "EsounD" ); set_capability( "audio output", 50 ); - add_string( "esdserver", "", NULL, N_("Esound server"), NULL, VLC_FALSE ); + add_string( "esdserver", "", NULL, N_("Esound server"), NULL, false ); set_category( CAT_AUDIO ); set_subcategory( SUBCAT_AUDIO_AOUT ); set_callbacks( Open, Close ); @@ -86,10 +91,7 @@ static int Open( vlc_object_t *p_this ) /* Allocate structure */ p_sys = malloc( sizeof( aout_sys_t ) ); if( p_sys == NULL ) - { - msg_Err( p_aout, "out of memory" ); return VLC_ENOMEM; - } p_aout->output.p_sys = p_sys; @@ -144,6 +146,7 @@ static int Open( vlc_object_t *p_this ) { msg_Err( p_aout, "cannot open esound socket (format 0x%08x at %d Hz)", p_sys->esd_format, p_aout->output.output.i_rate ); + free( psz_server ); free( p_sys ); return VLC_EGENERIC; } @@ -178,6 +181,7 @@ static int Open( vlc_object_t *p_this ) / p_aout->output.output.i_bytes_per_frame / p_aout->output.output.i_rate; + free( psz_server ); close( i_newfd ); return VLC_SUCCESS; } @@ -229,7 +233,7 @@ static void Close( vlc_object_t *p_this ) ***************************************************************************** * This function writes a buffer of i_length bytes in the socket *****************************************************************************/ -static void Play( aout_thread_t *p_aout, byte_t *buffer, int i_size ) +static void Play( aout_thread_t *p_aout, uint8_t *buffer, int i_size ) { int i_amount;