X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Faudio_output%2Ffile.c;h=07da0fe1384492ef5aeeea22a6e2eff31fb3b626;hb=848489c3863b1b7ddbe542aa3e746063722b9280;hp=f7dde4c07ec2b0f6d794cca485435b7ff4e75a09;hpb=df61d33b06e2b3cbbe746b2f5a9bea5b370c24ff;p=vlc diff --git a/modules/audio_output/file.c b/modules/audio_output/file.c index f7dde4c07e..07da0fe138 100644 --- a/modules/audio_output/file.c +++ b/modules/audio_output/file.c @@ -25,13 +25,15 @@ /***************************************************************************** * Preamble *****************************************************************************/ -#include #ifdef HAVE_CONFIG_H # include "config.h" #endif -#include +#include + +#include +#include #include #include /* WAVEHEADER */ #include @@ -90,26 +92,26 @@ static void Play ( aout_instance_t * ); #define WAV_LONGTEXT N_("Instead of writing a raw file, you can add a WAV " \ "header to the file.") -static const char *format_list[] = { "u8", "s8", "u16", "s16", "u16_le", +static const char *const format_list[] = { "u8", "s8", "u16", "s16", "u16_le", "s16_le", "u16_be", "s16_be", "fixed32", "float32", "spdif" }; -static int format_int[] = { VLC_FOURCC('u','8',' ',' '), - VLC_FOURCC('s','8',' ',' '), - AOUT_FMT_U16_NE, AOUT_FMT_S16_NE, - VLC_FOURCC('u','1','6','l'), - VLC_FOURCC('s','1','6','l'), - VLC_FOURCC('u','1','6','b'), - VLC_FOURCC('s','1','6','b'), - VLC_FOURCC('f','i','3','2'), - VLC_FOURCC('f','l','3','2'), - VLC_FOURCC('s','p','i','f') }; +static const int format_int[] = { VLC_FOURCC('u','8',' ',' '), + VLC_FOURCC('s','8',' ',' '), + AOUT_FMT_U16_NE, AOUT_FMT_S16_NE, + VLC_FOURCC('u','1','6','l'), + VLC_FOURCC('s','1','6','l'), + VLC_FOURCC('u','1','6','b'), + VLC_FOURCC('s','1','6','b'), + VLC_FOURCC('f','i','3','2'), + VLC_FOURCC('f','l','3','2'), + VLC_FOURCC('s','p','i','f') }; #define FILE_TEXT N_("Output file") #define FILE_LONGTEXT N_("File to which the audio samples will be written to. (\"-\" for stdout") vlc_module_begin(); - set_description( _("File audio output") ); - set_shortname( _("File") ); + set_description( N_("File audio output") ); + set_shortname( N_("File") ); set_category( CAT_AUDIO ); set_subcategory( SUBCAT_AUDIO_AOUT ); @@ -153,10 +155,7 @@ static int Open( vlc_object_t * p_this ) /* Allocate structure */ p_aout->output.p_sys = malloc( sizeof( aout_sys_t ) ); if( p_aout->output.p_sys == NULL ) - { - msg_Err( p_aout, "out of memory" ); - return VLC_EGENERIC; - } + return VLC_ENOMEM; if( !strcmp( psz_name, "-" ) ) p_aout->output.p_sys->p_file = stdout;