]> git.sesse.net Git - vlc/blobdiff - modules/codec/adpcm.c
macosx: Fix controller playlist toggling to use the contentRect and not the window...
[vlc] / modules / codec / adpcm.c
index 909ac4f656e2deca1a25e1cf716fa709c6314d18..c9a9ec2f85cb9fa4176ada714b008bce184da261 100644 (file)
  *
  * Documentation: http://www.pcisys.net/~melanson/codecs/adpcm.txt
  *****************************************************************************/
-#include <vlc/vlc.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <vlc_common.h>
+#include <vlc_plugin.h>
 #include <vlc_aout.h>
 #include <vlc_codec.h>
 
@@ -40,7 +45,7 @@ static void CloseDecoder( vlc_object_t * );
 static aout_buffer_t *DecodeBlock( decoder_t *, block_t ** );
 
 vlc_module_begin();
-    set_description( _("ADPCM audio decoder") );
+    set_description( N_("ADPCM audio decoder") );
     set_capability( "decoder", 50 );
     set_category( CAT_INPUT );
     set_subcategory( SUBCAT_INPUT_ACODEC );
@@ -64,8 +69,8 @@ struct decoder_sys_t
 {
     enum adpcm_codec_e codec;
 
-    int                 i_block;
-    int                 i_samplesperblock;
+    size_t              i_block;
+    size_t              i_samplesperblock;
 
     audio_date_t        end_date;
 };
@@ -162,10 +167,7 @@ static int OpenDecoder( vlc_object_t *p_this )
     /* Allocate the memory needed to store the decoder's structure */
     if( ( p_dec->p_sys = p_sys =
           (decoder_sys_t *)malloc(sizeof(decoder_sys_t)) ) == NULL )
-    {
-        msg_Err( p_dec, "out of memory" );
         return VLC_ENOMEM;
-    }
 
     switch( p_dec->fmt_in.i_codec )
     {
@@ -200,7 +202,7 @@ static int OpenDecoder( vlc_object_t *p_this )
     {
         p_sys->i_block = (p_sys->codec == ADPCM_IMA_QT) ?
             34 * p_dec->fmt_in.audio.i_channels : 1024;
-        msg_Warn( p_dec, "block size undefined, using %d", p_sys->i_block );
+        msg_Warn( p_dec, "block size undefined, using %zu", p_sys->i_block );
     }
     else
     {
@@ -239,7 +241,7 @@ static int OpenDecoder( vlc_object_t *p_this )
     }
 
     msg_Dbg( p_dec, "format: samplerate:%d Hz channels:%d bits/sample:%d "
-             "blockalign:%d samplesperblock:%d",
+             "blockalign:%zu samplesperblock:%zu",
              p_dec->fmt_in.audio.i_rate, p_dec->fmt_in.audio.i_channels,
              p_dec->fmt_in.audio.i_bitspersample, p_sys->i_block,
              p_sys->i_samplesperblock );
@@ -614,7 +616,7 @@ static void DecodeAdpcmDk4( decoder_t *p_dec, int16_t *p_sample,
 {
     decoder_sys_t *p_sys  = p_dec->p_sys;
     adpcm_ima_wav_channel_t channel[2];
-    int                     i_nibbles;
+    size_t                  i_nibbles;
     int                     b_stereo;
 
     b_stereo = p_dec->fmt_in.audio.i_channels == 2 ? 1 : 0;