X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fcodec%2Ftwolame.c;h=9ff2dbe669bc242981e840b5428351ecaab0fef4;hb=8002c90b632af06ea8ddfc5c50c16dc26f7c001a;hp=17dec1e1608876b69ba6c6749c65e5448c74be4b;hpb=5b55ee1bb0a0212b967f8f4a33824ffc6b7c7f09;p=vlc diff --git a/modules/codec/twolame.c b/modules/codec/twolame.c index 17dec1e160..9ff2dbe669 100644 --- a/modules/codec/twolame.c +++ b/modules/codec/twolame.c @@ -29,7 +29,8 @@ # include "config.h" #endif -#include +#include +#include #include #include #include @@ -65,14 +66,14 @@ static block_t *Encode ( encoder_t *, aout_buffer_t * ); #define ENC_PSY_LONGTEXT N_( \ "Integer from -1 (no model) to 4." ) -static int pi_stereo_values[] = { 0, 1, 2 }; -static char *ppsz_stereo_descriptions[] = +static const int pi_stereo_values[] = { 0, 1, 2 }; +static const char *const ppsz_stereo_descriptions[] = { N_("Stereo"), N_("Dual mono"), N_("Joint stereo") }; vlc_module_begin(); set_shortname( "Twolame"); - set_description( _("Libtwolame audio encoder") ); + set_description( N_("Libtwolame audio encoder") ); set_capability( "encoder", 50 ); set_callbacks( OpenEncoder, CloseEncoder ); set_category( CAT_INPUT ); @@ -89,7 +90,7 @@ vlc_module_begin(); ENC_PSY_LONGTEXT, false ); vlc_module_end(); -static const char *ppsz_enc_options[] = { +static const char *const ppsz_enc_options[] = { "quality", "mode", "vbr", "psy", NULL }; @@ -159,10 +160,7 @@ static int OpenEncoder( vlc_object_t *p_this ) /* Allocate the memory needed to store the decoder's structure */ if( ( p_sys = (encoder_sys_t *)malloc(sizeof(encoder_sys_t)) ) == NULL ) - { - msg_Err( p_enc, "out of memory" ); - return VLC_EGENERIC; - } + return VLC_ENOMEM; p_enc->p_sys = p_sys; p_enc->pf_encode_audio = Encode;