]> git.sesse.net Git - vlc/commitdiff
codecs & packetizers: fix warnings
authorRafaël Carré <funman@videolan.org>
Tue, 29 Jan 2008 13:34:30 +0000 (13:34 +0000)
committerRafaël Carré <funman@videolan.org>
Tue, 29 Jan 2008 13:34:30 +0000 (13:34 +0000)
    use size_t instead of int to represent sizes
    removes unused parameters from:
        block_BytestreamInit()
        mpeg4_audio/LOASSyncInfo()
        cinepak/cinepak_Getv1()
        speex/SendPacket()
        subsass/ParseColor()
        ffmpeg/postprocess/InitPostproc() & PostprocPict()
        dvbsub/YuvaYuvp() & encode_pixel_line_{2,4,8}bp()
        faad/DoReordering()

vlc_block_helper.h:
    use size_t, removes unused parameter from block_BytestreamInit()

struct filter_t:
    removes unused parameters from pf_picture_link() & pf_picture_unlink()

cmml: fix a segfault (p_item isn't an input item, despite the name) present for some months, proving that nobody did use that code ?

41 files changed:
include/vlc_block_helper.h
include/vlc_filter.h
modules/codec/a52.c
modules/codec/adpcm.c
modules/codec/araw.c
modules/codec/cc.c
modules/codec/cc.h
modules/codec/cdg.c
modules/codec/cinepak.c
modules/codec/cmml/history.c
modules/codec/cmml/intf.c
modules/codec/cmml/xarray.c
modules/codec/cmml/xtag.c
modules/codec/cmml/xurl.c
modules/codec/cvdsub.c
modules/codec/dmo/buffer.c
modules/codec/dmo/dmo.c
modules/codec/dts.c
modules/codec/dvbsub.c
modules/codec/faad.c
modules/codec/fake.c
modules/codec/ffmpeg/audio.c
modules/codec/ffmpeg/chroma.c
modules/codec/ffmpeg/encoder.c
modules/codec/ffmpeg/ffmpeg.h
modules/codec/ffmpeg/postprocess.c
modules/codec/ffmpeg/video.c
modules/codec/flac.c
modules/codec/mpeg_audio.c
modules/codec/png.c
modules/codec/rawvideo.c
modules/codec/sdl_image.c
modules/codec/speex.c
modules/codec/subtitles/subsass.c
modules/codec/svcdsub.c
modules/codec/x264.c
modules/packetizer/h264.c
modules/packetizer/mpeg4audio.c
modules/packetizer/mpeg4video.c
modules/packetizer/mpegvideo.c
modules/packetizer/vc1.c

index 35652e982498ed437e62e5027a4e118ee2908343..8500b0c07689776fc318c0fcd67234f30b1eb371 100644 (file)
@@ -34,16 +34,14 @@ typedef struct block_bytestream_t
 {
     block_t             *p_chain;
     block_t             *p_block;
-    int                 i_offset;
+    size_t              i_offset;
 
 } block_bytestream_t;
 
-#define block_BytestreamInit( a ) __block_BytestreamInit( VLC_OBJECT(a) )
-
 /*****************************************************************************
  * block_bytestream_t management
  *****************************************************************************/
-static inline block_bytestream_t __block_BytestreamInit( vlc_object_t *p_obj )
+static inline block_bytestream_t block_BytestreamInit( void )
 {
     block_bytestream_t bytestream;
 
@@ -216,10 +214,10 @@ static inline int block_GetByte( block_bytestream_t *p_bytestream,
 }
 
 static inline int block_WaitBytes( block_bytestream_t *p_bytestream,
-                                   int i_data )
+                                   size_t i_data )
 {
     block_t *p_block;
-    int i_offset, i_copy, i_size;
+    size_t i_offset, i_copy, i_size;
 
     /* Check we have that much data */
     i_offset = p_bytestream->i_offset;
@@ -244,10 +242,10 @@ static inline int block_WaitBytes( block_bytestream_t *p_bytestream,
 }
 
 static inline int block_SkipBytes( block_bytestream_t *p_bytestream,
-                                   int i_data )
+                                   size_t i_data )
 {
     block_t *p_block;
-    int i_offset, i_copy;
+    size_t i_offset, i_copy;
 
     /* Check we have that much data */
     i_offset = p_bytestream->i_offset;
@@ -275,10 +273,10 @@ static inline int block_SkipBytes( block_bytestream_t *p_bytestream,
 }
 
 static inline int block_PeekBytes( block_bytestream_t *p_bytestream,
-                                   uint8_t *p_data, int i_data )
+                                   uint8_t *p_data, size_t i_data )
 {
     block_t *p_block;
-    int i_offset, i_copy, i_size;
+    size_t i_offset, i_copy, i_size;
 
     /* Check we have that much data */
     i_offset = p_bytestream->i_offset;
@@ -325,10 +323,10 @@ static inline int block_PeekBytes( block_bytestream_t *p_bytestream,
 }
 
 static inline int block_GetBytes( block_bytestream_t *p_bytestream,
-                                  uint8_t *p_data, int i_data )
+                                  uint8_t *p_data, size_t i_data )
 {
     block_t *p_block;
-    int i_offset, i_copy, i_size;
+    size_t i_offset, i_copy, i_size;
 
     /* Check we have that much data */
     i_offset = p_bytestream->i_offset;
@@ -379,10 +377,10 @@ static inline int block_GetBytes( block_bytestream_t *p_bytestream,
 }
 
 static inline int block_PeekOffsetBytes( block_bytestream_t *p_bytestream,
-    int i_peek_offset, uint8_t *p_data, int i_data )
+    size_t i_peek_offset, uint8_t *p_data, size_t i_data )
 {
     block_t *p_block;
-    int i_offset, i_copy, i_size;
+    size_t i_offset, i_copy, i_size;
 
     /* Check we have that much data */
     i_offset = p_bytestream->i_offset;
@@ -443,11 +441,12 @@ static inline int block_PeekOffsetBytes( block_bytestream_t *p_bytestream,
 }
 
 static inline int block_FindStartcodeFromOffset(
-    block_bytestream_t *p_bytestream, int *pi_offset,
+    block_bytestream_t *p_bytestream, size_t *pi_offset,
     uint8_t *p_startcode, int i_startcode_length )
 {
     block_t *p_block, *p_block_backup = 0;
-    int i_size, i_offset, i_offset_backup = 0;
+    int i_size = 0;
+    size_t i_offset, i_offset_backup = 0;
     int i_caller_offset_backup = 0, i_match;
 
     /* Find the right place */
@@ -468,7 +467,7 @@ static inline int block_FindStartcodeFromOffset(
     /* Begin the search.
      * We first look for an occurrence of the 1st startcode byte and
      * if found, we do a more thorough check. */
-    i_size = p_block->i_buffer + i_size;
+    i_size += p_block->i_buffer;
     *pi_offset -= i_size;
     i_match = 0;
     for( ; p_block != NULL; p_block = p_block->p_next )
index fd6897bb22c5df772f7c8277b73e29515f233fcb..8cb42df0fc2228ef43a390337854e828f3bee3a8 100644 (file)
@@ -81,8 +81,8 @@ struct filter_t
     /* Video output callbacks */
     picture_t     * ( * pf_vout_buffer_new) ( filter_t * );
     void            ( * pf_vout_buffer_del) ( filter_t *, picture_t * );
-    void            ( * pf_picture_link)    ( filter_t *, picture_t * );
-    void            ( * pf_picture_unlink)  ( filter_t *, picture_t * );
+    void            ( * pf_picture_link)    ( picture_t * );
+    void            ( * pf_picture_unlink)  ( picture_t * );
 
     /* SPU output callbacks */
     subpicture_t *  ( * pf_sub_buffer_new) ( filter_t * );
index 4e5fdb7e3b9ce2c4242e886cd69982e4c34ea2cc..69ad19ed8c9cb0c2d42bac163c0dfae9644a470f 100644 (file)
@@ -133,7 +133,7 @@ static int OpenDecoder( vlc_object_t *p_this )
     p_sys->i_state = STATE_NOSYNC;
     aout_DateSet( &p_sys->end_date, 0 );
 
-    p_sys->bytestream = block_BytestreamInit( p_dec );
+    p_sys->bytestream = block_BytestreamInit();
     p_sys->i_input_rate = INPUT_RATE_DEFAULT;
 
     /* Set output properties */
index 044fcd6d07713532051e45986139b8368f7aa56f..3b9fbd1509ab2af92acd751b1af26ce8894a5f35 100644 (file)
@@ -68,8 +68,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;
 };
@@ -618,7 +618,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;
index e31843cd2de3de3c956ab20b31cf9a2edd03b477..26d576b9d04c2ed7550402c78008c95da1f3515f 100644 (file)
@@ -1463,7 +1463,7 @@ static int EncoderOpen( vlc_object_t *p_this )
  *****************************************************************************/
 static void EncoderClose ( vlc_object_t *p_this )
 {
-    return;
+    VLC_UNUSED(p_this);
 }
 
 /*****************************************************************************
index 4ccd807866bd60b41339e85ad03a8cac1e030372..0e62866dc264f81dbfd29fb73a33d18a19f1b047 100644 (file)
@@ -226,8 +226,6 @@ static subpicture_t *Convert( decoder_t *, block_t * );
 
 static subpicture_t *Decode( decoder_t *p_dec, block_t **pp_block )
 {
-    decoder_sys_t *p_sys = p_dec->p_sys;
-
     if( pp_block && *pp_block )
     {
         Push( p_dec, *pp_block );
index 0ad61d68339ddab20f5b187a89f2de7ca1edf8cb..722e244287d0d901964ccaf005f39e290e0ef3ef 100644 (file)
@@ -66,6 +66,7 @@ static inline void cc_Init( cc_data_t *c )
 }
 static inline void cc_Exit( cc_data_t *c )
 {
+    VLC_UNUSED(c);
     return;
 }
 static inline void cc_Flush( cc_data_t *c )
index a2110c037ad3421091eebf02233204643a0e7031..6aea4f18427448a2ab460cbd54f271a0766b5676 100644 (file)
@@ -2,7 +2,7 @@
  * cdg.c: CDG decoder module
  *****************************************************************************
  * Copyright (C) 2007 Laurent Aimar
- * $Id$
+ * $Id$
  *
  * Authors: Laurent Aimar <fenrir # via.ecp.fr>
  *
@@ -194,8 +194,9 @@ static void ScreenFill( decoder_sys_t *p_cdg, int sx, int sy, int dx, int dy, in
 static int DecodeMemoryPreset( decoder_sys_t *p_cdg, const uint8_t *p_data )
 {
     const int i_color = p_data[0]&0x0f;
+#if 0
     const int i_repeat= p_data[1]&0x0f;
-
+#endif
     /* if i_repeat > 0 we could ignore it if we have a reliable stream */
     ScreenFill( p_cdg, 0, 0, CDG_SCREEN_WIDTH, CDG_SCREEN_HEIGHT, i_color );
     return 0;
index f7384583ce693cb21874ae248f24b1b90f0916e6..09b491b5f6ff3b2fca179b878eea9e3b4fd9452f 100644 (file)
@@ -278,7 +278,7 @@ static void cinepak_LoadCodebook( cinepak_codebook_t *p_codebook,
 
 static void cinepak_Getv4( cinepak_context_t *p_context,
                            int i_strip, int i_x, int i_y,
-                           int i_x2, int i_y2, uint8_t *p_data )
+                           uint8_t *p_data )
 {
     uint8_t i_index[4];
     int i,j;
@@ -325,7 +325,7 @@ static void cinepak_Getv4( cinepak_context_t *p_context,
 
 static void cinepak_Getv1( cinepak_context_t *p_context,
                            int i_strip, int i_x,  int i_y,
-                           int i_x2, int i_y2, uint8_t *p_data )
+                           uint8_t *p_data )
 {
     uint8_t i_index;
     int i,j;
@@ -587,7 +587,6 @@ static int cinepak_decode_frame( cinepak_context_t *p_context,
                                            i_strip,
                                            i_strip_x1 + i_x,
                                            i_strip_y1 + i_y,
-                                           i_strip_x2, i_strip_y2,
                                            p_data );
                             p_data += 4;
                             i_chunk_size -= 4;
@@ -598,7 +597,6 @@ static int cinepak_decode_frame( cinepak_context_t *p_context,
                                            i_strip,
                                            i_strip_x1 + i_x,
                                            i_strip_y1 + i_y,
-                                           i_strip_x2, i_strip_y2,
                                            p_data );
                             p_data++;
                             i_chunk_size--;
@@ -646,7 +644,6 @@ static int cinepak_decode_frame( cinepak_context_t *p_context,
                                                i_strip,
                                                i_strip_x1 + i_x,
                                                i_strip_y1 + i_y,
-                                               i_strip_x2, i_strip_y2,
                                                p_data );
                                 p_data += 4;
                                 i_chunk_size -= 4;
@@ -658,7 +655,6 @@ static int cinepak_decode_frame( cinepak_context_t *p_context,
                                                i_strip,
                                                i_strip_x1 + i_x,
                                                i_strip_y1 + i_y,
-                                               i_strip_x2, i_strip_y2,
                                                p_data );
                                 p_data++;
                                 i_chunk_size--;
@@ -684,7 +680,6 @@ static int cinepak_decode_frame( cinepak_context_t *p_context,
                                    i_strip,
                                    i_strip_x1 + i_x,
                                    i_strip_y1 + i_y,
-                                   i_strip_x2, i_strip_y2,
                                    p_data );
                     p_data++;
                     i_chunk_size--;
index 58f59507b895e05486e2ff41125b984f180cb99d..2e505f8198e7d30e4b4ac926feeed087122f7306 100644 (file)
@@ -119,10 +119,8 @@ static void history_Dump( history_t *p_history )
             fprintf( stderr, "HISTORY: [%d] NULL\n", i );
         else
         {
-            char *psz_uri = input_item_GetURI( p_item );
             fprintf( stderr, "HISTORY: [%d] %p (%p->%s)\n", i, p_item,
-                     psz_uri, psz_uri );
-            free( psz_uri );
+                     p_item->psz_uri, p_item->psz_uri );
         }
     }
 }
index b1940c0300ba2b87aa75026aee41868d4cf65f62..b58a987bfac196cd8d7a81bcd0dc2f5292dd6236 100644 (file)
@@ -78,6 +78,10 @@ struct navigation_history_t
 /*****************************************************************************
  * Local prototypes.
  *****************************************************************************/
+
+int          E_(OpenIntf)               ( vlc_object_t * );
+void         E_(CloseIntf)              ( vlc_object_t * );
+
 static int   InitThread                 ( intf_thread_t * );
 static int   MouseEvent                 ( vlc_object_t *, char const *,
                                           vlc_value_t, vlc_value_t, void * );
@@ -400,6 +404,9 @@ static int InitThread( intf_thread_t * p_intf )
 static int MouseEvent( vlc_object_t *p_this, char const *psz_var,
                        vlc_value_t oldval, vlc_value_t newval, void *p_data )
 {
+    VLC_UNUSED(p_this); VLC_UNUSED(psz_var);
+    VLC_UNUSED(oldval); VLC_UNUSED(newval);
+    VLC_UNUSED(p_data);
     /* TODO: handle mouse clicks on the anchor text */
 
     return VLC_SUCCESS;
@@ -411,6 +418,8 @@ static int MouseEvent( vlc_object_t *p_this, char const *psz_var,
 static int KeyEvent( vlc_object_t *p_this, char const *psz_var,
                        vlc_value_t oldval, vlc_value_t newval, void *p_data )
 {
+    VLC_UNUSED(p_this); VLC_UNUSED(psz_var);
+    VLC_UNUSED(oldval); VLC_UNUSED(newval);
     intf_thread_t *p_intf = (intf_thread_t *)p_data;
     vlc_mutex_lock( &p_intf->change_lock );
 
@@ -576,6 +585,7 @@ char *GetTimedURLFromPlaylistItem( intf_thread_t *p_intf,
 
     return psz_return_value;
 #else
+    VLC_UNUSED(p_intf);
     void *p;
 
     /* Suppress warning messages about unused functions */
@@ -616,6 +626,8 @@ static
 int GoBackCallback( vlc_object_t *p_this, char const *psz_var,
                     vlc_value_t oldval, vlc_value_t newval, void *p_data )
 {
+    VLC_UNUSED(p_this); VLC_UNUSED(psz_var);
+    VLC_UNUSED(oldval); VLC_UNUSED(newval);
     intf_thread_t *p_intf = (intf_thread_t *) p_data;
     GoBack( p_intf );
     return VLC_SUCCESS;
@@ -625,6 +637,8 @@ static
 int GoForwardCallback( vlc_object_t *p_this, char const *psz_var,
                        vlc_value_t oldval, vlc_value_t newval, void *p_data )
 {
+    VLC_UNUSED(p_this); VLC_UNUSED(psz_var);
+    VLC_UNUSED(oldval); VLC_UNUSED(newval);
     intf_thread_t *p_intf = (intf_thread_t *) p_data;
     GoForward( p_intf );
     return VLC_SUCCESS;
@@ -635,6 +649,8 @@ int FollowAnchorCallback( vlc_object_t *p_this, char const *psz_var,
                           vlc_value_t oldval, vlc_value_t newval,
                           void *p_data )
 {
+    VLC_UNUSED(p_this); VLC_UNUSED(psz_var);
+    VLC_UNUSED(oldval); VLC_UNUSED(newval);
     intf_thread_t *p_intf = (intf_thread_t *) p_data;
     FollowAnchor( p_intf );
     return VLC_SUCCESS;
index 8441d7f7b2e1d8044bc81c47d81b16ab979eff65..461de1765d9f225755060a8834690e2392285369 100644 (file)
 #include <string.h>
 #include "xarray.h"
 
+/* local prototypes */
+XSTATIC XArray * xarray_New (unsigned int);
+
+
 #define XARRAY_ASSERT_NOT_NULL(xarray) \
     { \
         if (xarray == NULL) return XARRAY_ENULLPOINTER; \
@@ -39,9 +43,7 @@
 
 #define XARRAY_BOUNDS_CHECK(xarray, index) \
     { \
-        if (index < 0) \
-            return XARRAY_ENEGATIVEINDEX; \
-        else if (xarray->last_valid_element != -1 && \
+        if (xarray->last_valid_element != -1 && \
                  (int) index > xarray->last_valid_element) \
             return XARRAY_EINDEXTOOLARGE; \
     }
@@ -61,7 +63,7 @@ XSTATIC XArray * xarray_New (unsigned int initial_size_hint)
     new_xarray = (XArray *) malloc (sizeof(XArray));
     if (new_xarray == NULL) return NULL;
 
-    if (initial_size_hint <= 0)
+    if (initial_size_hint == 0)
         initial_size = XARRAY_DEFAULT_SIZE;
     else
         initial_size = initial_size_hint;
index 2387e1d18cb264cb81b8451aa43c22f30e722efe..024e1e93387e8e9f27631ec38f066a70a7d55827 100644 (file)
@@ -81,6 +81,15 @@ struct _XTagParser {
   char * end;
 };
 
+XTag * xtag_free (XTag * xtag);
+XTag * xtag_new_parse (const char * s, int n);
+char * xtag_get_name (XTag * xtag);
+char * xtag_get_pcdata (XTag * xtag);
+char * xtag_get_attribute (XTag * xtag, char * attribute);
+XTag * xtag_first_child (XTag * xtag, char * name);
+XTag * xtag_next_child (XTag * xtag, char * name);
+int    xtag_snprint (char * buf, int n, XTag * xtag);
+
 /* Character classes */
 #define X_NONE           0
 #define X_WHITESPACE  1<<0
index bad1ecad1e44eeb469ea85a737959cb6d396ccf5..73c6833d27de3aa64d63556eb5e94968724a6b74 100644 (file)
@@ -39,6 +39,7 @@ static char *xurl_strdup( const char *psz_string );
 #define xurl_strdup strdup
 #endif
 
+char        *XURL_FindQuery             ( char *psz_url );
 static char *XURL_FindHostname          ( char *psz_url );
 static char *XURL_FindPath              ( char *psz_url );
 static char *XURL_FindFragment          ( char *psz_url );
@@ -258,7 +259,6 @@ char *XURL_FindFragment( char *psz_url )
     return pc_return_value;
 }
 
-
 char *XURL_FindQuery( char *psz_url )
 {
     char *pc_question_mark = NULL;
index faaa42dbc5f18dabf6707d5f654a7a4e830cdd43..6e4955739adf874e75c6e68bf1251de9ec01c865 100644 (file)
@@ -80,16 +80,16 @@ struct decoder_sys_t
 
   block_t  *p_spu;   /* Bytes of the packet. */
 
-  int     i_spu_size;     /* goal for subtitle_data_pos while gathering,
+  size_t   i_spu_size;     /* goal for subtitle_data_pos while gathering,
                              size of used subtitle_data later */
 
   uint16_t i_image_offset;      /* offset from subtitle_data to compressed
                                    image data */
-  int i_image_length;           /* size of the compressed image data */
-  int first_field_offset;       /* offset of even raster lines */
-  int second_field_offset;      /* offset of odd raster lines */
-  int metadata_offset;          /* offset to data describing the image */
-  int metadata_length;          /* length of metadata */
+  size_t i_image_length;           /* size of the compressed image data */
+  size_t first_field_offset;       /* offset of even raster lines */
+  size_t second_field_offset;      /* offset of odd raster lines */
+  size_t metadata_offset;          /* offset to data describing the image */
+  size_t metadata_length;          /* length of metadata */
 
   mtime_t i_duration;   /* how long to display the image, 0 stands
                            for "until next subtitle" */
index c3bc07c162de0df6de4ca5334c109e820f38a033..e26c80dd870d0590f0536d5a1ee4a5bf90f5f632 100644 (file)
@@ -108,7 +108,7 @@ static long STDCALL GetBufferAndLength( IMediaBuffer *This,
     CMediaBuffer *p_mb = (CMediaBuffer *)This;
 
     if( !ppBuffer && !pcbLength ) return E_POINTER;
-    if( ppBuffer ) *ppBuffer = p_mb->p_block->p_buffer;
+    if( ppBuffer ) *ppBuffer = (char*)p_mb->p_block->p_buffer;
     if( pcbLength ) *pcbLength = p_mb->p_block->i_buffer;
     return S_OK;
 }
index 8ff51241781b8bcc0e1e7d2136df5ed6540b4e32..624b53659280759e3499c607e451c9e03c4f9221 100644 (file)
@@ -54,7 +54,7 @@
 
 #ifdef LOADER
 /* Not Needed */
-long CoInitialize( void *pvReserved ) { return -1; }
+long CoInitialize( void *pvReserved ) { VLC_UNUSED(pvReserved); return -1; }
 void CoUninitialize( void ) { }
 
 /* A few prototypes */
index 4e8bdfc4279091d3c2f74f2500791c7e056a2496..a588bbcf25f6a9a5b1a06ec744851e2cf0750291 100644 (file)
@@ -133,7 +133,7 @@ static int OpenDecoder( vlc_object_t *p_this )
     p_sys->i_state = STATE_NOSYNC;
     aout_DateSet( &p_sys->end_date, 0 );
 
-    p_sys->bytestream = block_BytestreamInit( p_dec );
+    p_sys->bytestream = block_BytestreamInit();
 
     /* Set output properties */
     p_dec->fmt_out.i_cat = AUDIO_ES;
index 9bbbddac29f25912ea737c32c8c36dca4e7425f7..15b25090d86cbef20aef684a814801baa0fa5a02 100644 (file)
@@ -1700,7 +1700,7 @@ static int OpenEncoder( vlc_object_t *p_this )
 /* FIXME: this routine is a hack to convert VLC_FOURCC('Y','U','V','A')
  *        into VLC_FOURCC('Y','U','V','P')
  */
-static subpicture_t *YuvaYuvp( encoder_t *p_enc, subpicture_t *p_subpic )
+static subpicture_t *YuvaYuvp( subpicture_t *p_subpic )
 {
     subpicture_region_t *p_region = NULL;
 
@@ -1920,7 +1920,7 @@ static block_t *Encode( encoder_t *p_enc, subpicture_t *p_subpic )
     p_region = p_subpic->p_region;
     if( p_region->fmt.i_chroma == VLC_FOURCC('Y','U','V','A') )
     {
-        p_temp = YuvaYuvp( p_enc, p_subpic );
+        p_temp = YuvaYuvp( p_subpic );
         if( !p_temp )
         {
             msg_Err( p_enc, "no picture in subpicture" );
@@ -2318,14 +2318,11 @@ static void encode_object( encoder_t *p_enc, bs_t *s, subpicture_t *p_subpic )
     }
 }
 
-static void encode_pixel_line_2bp( encoder_t *p_enc, bs_t *s,
-                                   subpicture_region_t *p_region,
+static void encode_pixel_line_2bp( bs_t *s, subpicture_region_t *p_region,
                                    int i_line );
-static void encode_pixel_line_4bp( encoder_t *p_enc, bs_t *s,
-                                   subpicture_region_t *p_region,
+static void encode_pixel_line_4bp( bs_t *s, subpicture_region_t *p_region,
                                    int i_line );
-static void encode_pixel_line_8bp( encoder_t *p_enc, bs_t *s,
-                                   subpicture_region_t *p_region,
+static void encode_pixel_line_8bp( bs_t *s, subpicture_region_t *p_region,
                                    int i_line );
 static void encode_pixel_data( encoder_t *p_enc, bs_t *s,
                                subpicture_region_t *p_region,
@@ -2347,17 +2344,17 @@ static void encode_pixel_data( encoder_t *p_enc, bs_t *s,
 
         case 4:
             bs_write( s, 8, 0x10 ); /* 2 bit/pixel code string */
-            encode_pixel_line_2bp( p_enc, s, p_region, i_line );
+            encode_pixel_line_2bp( s, p_region, i_line );
             break;
 
         case 16:
             bs_write( s, 8, 0x11 ); /* 4 bit/pixel code string */
-            encode_pixel_line_4bp( p_enc, s, p_region, i_line );
+            encode_pixel_line_4bp( s, p_region, i_line );
             break;
 
         case 256:
             bs_write( s, 8, 0x12 ); /* 8 bit/pixel code string */
-            encode_pixel_line_8bp( p_enc, s, p_region, i_line );
+            encode_pixel_line_8bp( s, p_region, i_line );
             break;
 
         default:
@@ -2370,8 +2367,7 @@ static void encode_pixel_data( encoder_t *p_enc, bs_t *s,
     }
 }
 
-static void encode_pixel_line_2bp( encoder_t *p_enc, bs_t *s,
-                                   subpicture_region_t *p_region,
+static void encode_pixel_line_2bp( bs_t *s, subpicture_region_t *p_region,
                                    int i_line )
 {
     unsigned int i, i_length = 0;
@@ -2462,8 +2458,7 @@ static void encode_pixel_line_2bp( encoder_t *p_enc, bs_t *s,
     bs_align_0( s );
 }
 
-static void encode_pixel_line_4bp( encoder_t *p_enc, bs_t *s,
-                                   subpicture_region_t *p_region,
+static void encode_pixel_line_4bp( bs_t *s, subpicture_region_t *p_region,
                                    int i_line )
 {
     unsigned int i, i_length = 0;
@@ -2561,8 +2556,7 @@ static void encode_pixel_line_4bp( encoder_t *p_enc, bs_t *s,
     bs_align_0( s );
 }
 
-static void encode_pixel_line_8bp( encoder_t *p_enc, bs_t *s,
-                                   subpicture_region_t *p_region,
+static void encode_pixel_line_8bp( bs_t *s, subpicture_region_t *p_region,
                                    int i_line )
 {
     unsigned int i, i_length = 0;
index db8c8c64ca040d999fd97864cdac9fca730eece0..632cd12c81fd3cac7ee6f7f5169a0079bd7c9dcf 100644 (file)
@@ -51,8 +51,7 @@ vlc_module_end();
  * Local prototypes
  ****************************************************************************/
 static aout_buffer_t *DecodeBlock( decoder_t *, block_t ** );
-static void DoReordering( decoder_t *, uint32_t *, uint32_t *, int, int,
-                          uint32_t * );
+static void DoReordering( uint32_t *, uint32_t *, int, int, uint32_t * );
 
 #define MAX_CHANNEL_POSITIONS 9
 
@@ -67,7 +66,7 @@ struct decoder_sys_t
     /* temporary buffer */
     uint8_t *p_buffer;
     int     i_buffer;
-    int     i_buffer_size;
+    size_t  i_buffer_size;
 
     /* Channel positions of the current stream (for re-ordering) */
     uint32_t pi_channel_positions[MAX_CHANNEL_POSITIONS];
@@ -406,7 +405,7 @@ static aout_buffer_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
         p_out->end_date = aout_DateIncrement( &p_sys->date,
             (frame.samples / frame.channels) * p_sys->i_input_rate / INPUT_RATE_DEFAULT );
 
-        DoReordering( p_dec, (uint32_t *)p_out->p_buffer, samples,
+        DoReordering( (uint32_t *)p_out->p_buffer, samples,
                       frame.samples / frame.channels, frame.channels,
                       p_sys->pi_channel_positions );
 
@@ -441,8 +440,7 @@ static void Close( vlc_object_t *p_this )
  * DoReordering: do some channel re-ordering (the ac3 channel order is
  *   different from the aac one).
  *****************************************************************************/
-static void DoReordering( decoder_t *p_dec,
-                          uint32_t *p_out, uint32_t *p_in, int i_samples,
+static void DoReordering( uint32_t *p_out, uint32_t *p_in, int i_samples,
                           int i_nb_channels, uint32_t *pi_chan_positions )
 {
     int pi_chan_table[MAX_CHANNEL_POSITIONS];
index c75af4ef9e019bd4964080795e5d4341b24dd73f..3aa7a6255204461ccda1267dd0636566f7060926 100644 (file)
@@ -388,6 +388,7 @@ static int FakeCallback( vlc_object_t *p_this, char const *psz_var,
                          vlc_value_t oldval, vlc_value_t newval,
                          void *p_data )
 {
+    VLC_UNUSED(p_this); VLC_UNUSED(oldval);
     decoder_t *p_dec = (decoder_t *)p_data;
 
     if( !strcmp( psz_var, "fake-file" ) )
index e68354ffd5af15fdbb52ab72bece73998d9aaddf..9bc9cef9e6ae38b360d48b2b6722938e563d0033 100644 (file)
@@ -283,7 +283,7 @@ aout_buffer_t *E_( DecodeAudio )( decoder_t *p_dec, block_t **pp_block )
         block_Release( p_block );
         return NULL;
     }
-    else if( i_used > p_block->i_buffer )
+    else if( (size_t)i_used > p_block->i_buffer )
     {
         i_used = p_block->i_buffer;
     }
index 30bbae02b6a15bc8e41d3f3a53ab3f986d8fc505..669bf0bd8fe95cd974cbb0da4fa95ac038b21fe1 100644 (file)
@@ -247,9 +247,12 @@ static picture_t *video_new_buffer_filter( filter_t *p_filter )
 
 static void video_del_buffer_filter( filter_t *p_filter, picture_t *p_pic )
 {
-    (void)p_filter;
-    if( p_pic && p_pic->p_data_orig ) free( p_pic->p_data_orig );
-    if( p_pic ) free( p_pic );
+    VLC_UNUSED(p_filter);
+    if( p_pic )
+    {
+        free( p_pic->p_data_orig );
+        free( p_pic );
+    }
 }
 
 /*****************************************************************************
index 1275c1c93033ccaa5f692c92c519dcfa2694ca7b..12c99f0856e853905782bfb70b2898a62cd3820e 100644 (file)
@@ -163,7 +163,7 @@ static const uint16_t mpa_bitrate_tab[2][15] =
 static const uint16_t mpa_freq_tab[6] =
 { 44100, 48000, 32000, 22050, 24000, 16000 };
 
-static const int16_t mpeg4_default_intra_matrix[64] = {
+static const uint16_t mpeg4_default_intra_matrix[64] = {
   8, 17, 18, 19, 21, 23, 25, 27,
  17, 18, 19, 21, 23, 25, 27, 28,
  20, 21, 22, 23, 24, 26, 28, 30,
@@ -174,7 +174,7 @@ static const int16_t mpeg4_default_intra_matrix[64] = {
  27, 28, 30, 32, 35, 38, 41, 45,
 };
 
-static const int16_t mpeg4_default_non_intra_matrix[64] = {
+static const uint16_t mpeg4_default_non_intra_matrix[64] = {
  16, 17, 18, 19, 20, 21, 22, 23,
  17, 18, 19, 20, 21, 22, 23, 24,
  18, 19, 20, 21, 22, 23, 24, 25,
index 451c4d11117cc30fdaa351542667c154516a92dd..252e1604f9116375889e418ec8fb9e395ff9a717 100644 (file)
@@ -79,8 +79,8 @@ void E_(CloseScaler)( vlc_object_t * );
 
 /* Postprocessing module */
 void *E_(OpenPostproc)( decoder_t *, vlc_bool_t * );
-int E_(InitPostproc)( decoder_t *, void *, int, int, int );
-int E_(PostprocPict)( decoder_t *, void *, picture_t *, struct AVFrame * );
+int E_(InitPostproc)( void *, int, int, int );
+int E_(PostprocPict)( void *, picture_t *, struct AVFrame * );
 void E_(ClosePostproc)( decoder_t *, void * );
 
 /*****************************************************************************
index 36b00eec271b73d757714c3fc9afde61f2169691..c5da8e27bc6e5fe7a62359c0d22437f70136e2b7 100644 (file)
@@ -122,8 +122,7 @@ void *E_(OpenPostproc)( decoder_t *p_dec, vlc_bool_t *pb_pp )
 /*****************************************************************************
  * InitPostproc:
  *****************************************************************************/
-int E_(InitPostproc)( decoder_t *p_dec, void *p_data,
-                      int i_width, int i_height, int pix_fmt )
+int E_(InitPostproc)( void *p_data, int i_width, int i_height, int pix_fmt )
 {
     video_postproc_sys_t *p_sys = (video_postproc_sys_t *)p_data;
     unsigned i_cpu = vlc_CPU();
@@ -173,8 +172,7 @@ int E_(InitPostproc)( decoder_t *p_dec, void *p_data,
 /*****************************************************************************
  * PostprocPict:
  *****************************************************************************/
-int E_(PostprocPict)( decoder_t *p_dec, void *p_data,
-                      picture_t *p_pic, AVFrame *p_ff_pic )
+int E_(PostprocPict)( void *p_data, picture_t *p_pic, AVFrame *p_ff_pic )
 {
     video_postproc_sys_t *p_sys = (video_postproc_sys_t *)p_data;
 
@@ -224,6 +222,7 @@ void E_(ClosePostproc)( decoder_t *p_dec, void *p_data )
 static int PPQCallback( vlc_object_t *p_this, char const *psz_cmd,
                         vlc_value_t oldval, vlc_value_t newval, void *p_data )
 {
+    VLC_UNUSED(psz_cmd); VLC_UNUSED(oldval);
     decoder_t *p_dec = (decoder_t *)p_this;
     video_postproc_sys_t *p_sys = (video_postproc_sys_t *)p_data;
 
index a8a41ff3760a19779cf1df7089331a6e5a54ada8..5afef13d85741151160687824785c75c78d82cdc 100644 (file)
@@ -205,7 +205,7 @@ static inline picture_t *ffmpeg_NewPictBuf( decoder_t *p_dec,
 
     if( p_sys->p_pp && p_sys->b_pp && !p_sys->b_pp_init )
     {
-        E_(InitPostproc)( p_dec, p_sys->p_pp, p_context->width,
+        E_(InitPostproc)( p_sys->p_pp, p_context->width,
                           p_context->height, p_context->pix_fmt );
         p_sys->b_pp_init = VLC_TRUE;
     }
@@ -805,7 +805,7 @@ static void ffmpeg_CopyPicture( decoder_t *p_dec,
         int i_src_stride, i_dst_stride;
 
         if( p_sys->p_pp && p_sys->b_pp )
-            E_(PostprocPict)( p_dec, p_sys->p_pp, p_pic, p_ff_pic );
+            E_(PostprocPict)( p_sys->p_pp, p_pic, p_ff_pic );
         else
         {
             for( i_plane = 0; i_plane < p_pic->i_planes; i_plane++ )
index f77349aa3a567e08cd375ae02fc2dee24fbae8b5..8b7cbfd3a60459ee0fe72cb91fd797d014d9830e 100644 (file)
@@ -223,7 +223,7 @@ static int OpenDecoder( vlc_object_t *p_this )
     p_sys->i_state = STATE_NOSYNC;
     p_sys->b_stream_info = VLC_FALSE;
     p_sys->p_block=NULL;
-    p_sys->bytestream = block_BytestreamInit( p_dec );
+    p_sys->bytestream = block_BytestreamInit();
 
 #ifdef USE_LIBFLAC
     /* Take care of flac init */
@@ -586,6 +586,7 @@ static FLAC__StreamDecoderReadStatus
 DecoderReadCallback( const FLAC__StreamDecoder *decoder, FLAC__byte buffer[],
                      unsigned *bytes, void *client_data )
 {
+    VLC_UNUSED(decoder);
     decoder_t *p_dec = (decoder_t *)client_data;
     decoder_sys_t *p_sys = p_dec->p_sys;
 
@@ -613,6 +614,7 @@ DecoderWriteCallback( const FLAC__StreamDecoder *decoder,
                       const FLAC__Frame *frame,
                       const FLAC__int32 *const buffer[], void *client_data )
 {
+    VLC_UNUSED(decoder);
     decoder_t *p_dec = (decoder_t *)client_data;
     decoder_sys_t *p_sys = p_dec->p_sys;
 
@@ -648,6 +650,7 @@ static void DecoderMetadataCallback( const FLAC__StreamDecoder *decoder,
                                      const FLAC__StreamMetadata *metadata,
                                      void *client_data )
 {
+    VLC_UNUSED(decoder);
     decoder_t *p_dec = (decoder_t *)client_data;
     decoder_sys_t *p_sys = p_dec->p_sys;
 
@@ -697,6 +700,7 @@ static void DecoderErrorCallback( const FLAC__StreamDecoder *decoder,
                                   FLAC__StreamDecoderErrorStatus status,
                                   void *client_data )
 {
+    VLC_UNUSED(decoder);
     decoder_t *p_dec = (decoder_t *)client_data;
 
     switch( status )
@@ -1344,6 +1348,7 @@ static void EncoderMetadataCallback( const FLAC__StreamEncoder *encoder,
                                      const FLAC__StreamMetadata *metadata,
                                      void *client_data )
 {
+    VLC_UNUSED(encoder);
     encoder_t *p_enc = (encoder_t *)client_data;
 
     msg_Err( p_enc, "MetadataCallback: %i", metadata->type );
@@ -1359,6 +1364,7 @@ EncoderWriteCallback( const FLAC__StreamEncoder *encoder,
                       unsigned bytes, unsigned samples,
                       unsigned current_frame, void *client_data )
 {
+    VLC_UNUSED(encoder); VLC_UNUSED(current_frame);
     encoder_t *p_enc = (encoder_t *)client_data;
     encoder_sys_t *p_sys = p_enc->p_sys;
     block_t *p_block;
index 6c87a64be8471449a4fdb5ff2619e601ddee5c9e..5e1eec97a4d101d6a98eb4c2c80b8dd27215b56c 100644 (file)
@@ -160,7 +160,7 @@ static int OpenDecoder( vlc_object_t *p_this )
     p_sys->b_packetizer = VLC_FALSE;
     p_sys->i_state = STATE_NOSYNC;
     aout_DateSet( &p_sys->end_date, 0 );
-    p_sys->bytestream = block_BytestreamInit( p_dec );
+    p_sys->bytestream = block_BytestreamInit();
     p_sys->b_discontinuity = VLC_FALSE;
     p_sys->i_input_rate = INPUT_RATE_DEFAULT;
 
index 7bcc290563a12c568a7f30e5aeb76e3177f84ed8..208fba148fb7d50f3252af75915e30feb9cdcfde 100644 (file)
@@ -96,7 +96,7 @@ static int OpenDecoder( vlc_object_t *p_this )
 static void user_read( png_structp p_png, png_bytep data, png_size_t i_length )
 {
     block_t *p_block = (block_t *)png_get_io_ptr( p_png );
-    png_size_t i_read = __MIN( p_block->i_buffer, (int)i_length );
+    png_size_t i_read = __MIN( p_block->i_buffer, i_length );
     memcpy( data, p_block->p_buffer, i_length );
     p_block->p_buffer += i_length;
     p_block->i_buffer -= i_length;
index f842d35c10fb6d281d6b58ec1f7ffd98c7bf32b7..f27b91ba01d79dc5ae8ceb8b90447ba16086d349 100644 (file)
@@ -43,7 +43,7 @@ struct decoder_sys_t
     /*
      * Input properties
      */
-    int i_raw_size;
+    size_t i_raw_size;
     vlc_bool_t b_invert;
 
     /*
index 69ebebdda12c79bcb9dfa6be9c8658a9a53d4f75..065c47a766fce890dbac9aa407afcc5803064cde 100644 (file)
@@ -185,7 +185,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
             uint8_t r, g, b;
             for ( i = 0; i < p_surface->h; i++ )
             {
-                p_src = p_surface->pixels + i * p_surface->pitch;
+                p_src = (uint8_t*)p_surface->pixels + i * p_surface->pitch;
                 p_dst = p_pic->p[0].p_pixels + i * p_pic->p[0].i_pitch;
                 for ( j = 0; j < p_surface->w; j++ )
                 {
@@ -221,7 +221,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
             uint8_t r, g, b;
             for ( i = 0; i < p_surface->h; i++ )
             {
-                p_src = p_surface->pixels + i * p_surface->pitch;
+                p_src = (uint8_t*)p_surface->pixels + i * p_surface->pitch;
                 p_dst = p_pic->p[0].p_pixels + i * p_pic->p[0].i_pitch;
                 for ( j = 0; j < p_surface->w; j++ )
                 {
@@ -242,7 +242,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
             uint8_t r, g, b, a;
             for ( i = 0; i < p_surface->h; i++ )
             {
-                p_src = p_surface->pixels + i * p_surface->pitch;
+                p_src = (uint8_t*)p_surface->pixels + i * p_surface->pitch;
                 p_dst = p_pic->p[0].p_pixels + i * p_pic->p[0].i_pitch;
                 for ( j = 0; j < p_surface->w; j++ )
                 {
index 8583bee53ca468579e8520de53b210384ecddf49..2548da4c301e7153533f8ef31859f906f49ac05b 100644 (file)
@@ -96,7 +96,7 @@ static int  ProcessInitialHeader ( decoder_t *, ogg_packet * );
 static void *ProcessPacket( decoder_t *, ogg_packet *, block_t ** );
 
 static aout_buffer_t *DecodePacket( decoder_t *, ogg_packet * );
-static block_t *SendPacket( decoder_t *, ogg_packet *, block_t * );
+static block_t *SendPacket( decoder_t *, block_t * );
 
 static void ParseSpeexComments( decoder_t *, ogg_packet * );
 
@@ -486,8 +486,8 @@ static void *ProcessPacket( decoder_t *p_dec, ogg_packet *p_oggpacket,
             */
            speex_bits_rewind( &p_sys->bits );
            speex_bits_write( &p_sys->bits, 
-               p_new_block->p_buffer, 
-               i_bytes_in_speex_frame );
+               (char*)p_new_block->p_buffer, 
+                   (int)i_bytes_in_speex_frame );
 
            /*
             * Move the remaining part of the original packet (subsequent
@@ -506,11 +506,11 @@ static void *ProcessPacket( decoder_t *p_dec, ogg_packet *p_oggpacket,
                 */
                i_bytes_in_speex_frame--;
                speex_bits_write( &p_sys->bits, 
-                   p_block->p_buffer, 
-                   p_block->i_buffer - i_bytes_in_speex_frame );
-               p_block = block_Realloc( p_block, 
+                       (char*)p_block->p_buffer, 
+                       p_block->i_buffer - i_bytes_in_speex_frame );
+            p_block = block_Realloc( p_block, 
                    0, 
-                   p_block->i_buffer-i_bytes_in_speex_frame );
+                       p_block->i_buffer-i_bytes_in_speex_frame );
                *pp_block = p_block;
            }
            else
@@ -519,11 +519,11 @@ static void *ProcessPacket( decoder_t *p_dec, ogg_packet *p_oggpacket,
            }
 
            free( p_frame_holder );
-           return SendPacket( p_dec, p_oggpacket /*Not used*/, p_new_block);
+           return SendPacket( p_dec, p_new_block);
        }
        else
        {
-            return SendPacket( p_dec, p_oggpacket, p_block );
+            return SendPacket( p_dec, p_block );
        }
     }
     else
@@ -636,8 +636,8 @@ static aout_buffer_t *DecodeRtpSpeexPacket( decoder_t *p_dec, block_t **pp_block
       Decode the input and ensure that no errors 
       were encountered.
     */
-    i_decode_ret = 
-        speex_decode_int( p_sys->p_state,&p_sys->bits,p_aout_buffer->p_buffer );
+    i_decode_ret = speex_decode_int( p_sys->p_state, &p_sys->bits, 
+            (spx_int16_t*)p_aout_buffer->p_buffer );
     if ( i_decode_ret < 0 )
     {
         msg_Err( p_dec, "Decoding failed. Perhaps we have a bad stream?" );
@@ -724,8 +724,7 @@ static aout_buffer_t *DecodePacket( decoder_t *p_dec, ogg_packet *p_oggpacket )
 /*****************************************************************************
  * SendPacket: send an ogg packet to the stream output.
  *****************************************************************************/
-static block_t *SendPacket( decoder_t *p_dec, ogg_packet *p_oggpacket,
-                            block_t *p_block )
+static block_t *SendPacket( decoder_t *p_dec, block_t *p_block )
 {
     decoder_sys_t *p_sys = p_dec->p_sys;
 
index f832af19172d4fd2d260a30297b627b490ae260c..d8865f92d8d4737d49b4e1359804ae4469b96fd4 100644 (file)
@@ -151,10 +151,7 @@ void ParseSSAString( decoder_t *p_dec,
  * ParseColor: SSA stores color in BBGGRR, in ASS it uses AABBGGRR
  * The string value in the string can be a pure integer, or hexadecimal &HBBGGRR
  *****************************************************************************/
-static void ParseColor( decoder_t *p_dec,
-                        char *psz_color,
-                        int *pi_color,
-                        int *pi_alpha )
+static void ParseColor( char *psz_color, int *pi_color, int *pi_alpha )
 {
     int i_color = 0;
     if( !strncasecmp( psz_color, "&H", 2 ) )
@@ -243,8 +240,8 @@ void ParseSSAHeader( decoder_t *p_dec )
                     p_style->font_style.psz_fontname = strdup( psz_temp_fontname );
                     p_style->font_style.i_font_size = i_font_size;
 
-                    ParseColor( p_dec, psz_temp_color1, &p_style->font_style.i_font_color, NULL );
-                    ParseColor( p_dec, psz_temp_color4, &p_style->font_style.i_shadow_color, NULL );
+                    ParseColor( psz_temp_color1, &p_style->font_style.i_font_color, NULL );
+                    ParseColor( psz_temp_color4, &p_style->font_style.i_shadow_color, NULL );
                     p_style->font_style.i_outline_color = p_style->font_style.i_shadow_color;
                     p_style->font_style.i_font_alpha = p_style->font_style.i_outline_alpha
                                                      = p_style->font_style.i_shadow_alpha = 0x00;
@@ -304,11 +301,11 @@ void ParseSSAHeader( decoder_t *p_dec )
                     p_style->font_style.psz_fontname = strdup( psz_temp_fontname );
                     p_style->font_style.i_font_size = i_font_size;
                     msg_Dbg( p_dec, psz_temp_color1 );
-                    ParseColor( p_dec, psz_temp_color1, &p_style->font_style.i_font_color,
+                    ParseColor( psz_temp_color1, &p_style->font_style.i_font_color,
                                 &p_style->font_style.i_font_alpha );
-                    ParseColor( p_dec, psz_temp_color3, &p_style->font_style.i_outline_color,
+                    ParseColor( psz_temp_color3, &p_style->font_style.i_outline_color,
                                 &p_style->font_style.i_outline_alpha );
-                    ParseColor( p_dec, psz_temp_color4, &p_style->font_style.i_shadow_color,
+                    ParseColor( psz_temp_color4, &p_style->font_style.i_shadow_color,
                                 &p_style->font_style.i_shadow_alpha );
 
                     p_style->font_style.i_style_flags = 0;
index 5a41f5c77facda043a5147d101dd8f84dc3f636d..fb347a1cec1bb9734521ae3ada10542c64b691a8 100644 (file)
@@ -113,15 +113,15 @@ struct decoder_sys_t
   uint16_t i_image;       /* image number in the subtitle stream */
   uint8_t  i_packet;      /* packet number for above image number */
 
-  int     i_spu_size;     /* goal for subtitle_data_pos while gathering,
+  size_t   i_spu_size;     /* goal for subtitle_data_pos while gathering,
                              size of used subtitle_data later */
 
   uint16_t i_image_offset;      /* offset from subtitle_data to compressed
                                    image data */
-  int i_image_length;           /* size of the compressed image data */
-  int second_field_offset;      /* offset of odd raster lines */
-  int metadata_offset;          /* offset to data describing the image */
-  int metadata_length;          /* length of metadata */
+  size_t i_image_length;           /* size of the compressed image data */
+  size_t second_field_offset;      /* offset of odd raster lines */
+  size_t metadata_offset;          /* offset to data describing the image */
+  size_t metadata_length;          /* length of metadata */
 
   mtime_t i_duration;   /* how long to display the image, 0 stands
                            for "until next subtitle" */
index 5fd15961a234a9298cbbb18341258003ea20c3c0..3942988fc7d6c9514ddb0bf828b6f66fe0973fe7 100644 (file)
@@ -1181,8 +1181,8 @@ static int  Open ( vlc_object_t *p_this )
 
         p_enc->fmt_out.p_extra = realloc( p_enc->fmt_out.p_extra, p_enc->fmt_out.i_extra + i_size );
 
-        memcpy( p_enc->fmt_out.p_extra + p_enc->fmt_out.i_extra,
-                p_sys->p_buffer, i_size );
+        memcpy( (uint8_t*)p_enc->fmt_out.p_extra + p_enc->fmt_out.i_extra,
+            p_sys->p_buffer, i_size );
 
         p_enc->fmt_out.i_extra += i_size;
     }
index 83b5bfc29bc15a113480a3949d6ddfe74178e606..04336a7a45be32173782991226ce72ad63773721 100644 (file)
@@ -87,7 +87,7 @@ struct decoder_sys_t
     block_bytestream_t bytestream;
 
     int     i_state;
-    int     i_offset;
+    size_t  i_offset;
     uint8_t startcode[4];
 
     vlc_bool_t b_slice;
@@ -182,7 +182,7 @@ static int Open( vlc_object_t *p_this )
     p_sys->startcode[1] = 0;
     p_sys->startcode[2] = 0;
     p_sys->startcode[3] = 1;
-    p_sys->bytestream = block_BytestreamInit( p_dec );
+    p_sys->bytestream = block_BytestreamInit();
     p_sys->b_slice = VLC_FALSE;
     p_sys->p_frame = NULL;
     p_sys->b_sps   = VLC_FALSE;
index 6f238634aebfbb28a960b01978fa8c4e9becd277..81a5636723a2adc4bb5f69044e5a6c94ed77b0e7 100644 (file)
@@ -209,7 +209,7 @@ static int OpenPacketizer( vlc_object_t *p_this )
     /* Misc init */
     p_sys->i_state = STATE_NOSYNC;
     aout_DateSet( &p_sys->end_date, 0 );
-    p_sys->bytestream = block_BytestreamInit( p_dec );
+    p_sys->bytestream = block_BytestreamInit();
     p_sys->i_input_rate = INPUT_RATE_DEFAULT;
     p_sys->b_latm_cfg = VLC_FALSE;
 
@@ -368,7 +368,7 @@ static int ADTSSyncInfo( decoder_t * p_dec, const byte_t * p_buf,
 /****************************************************************************
  * LOAS helpers
  ****************************************************************************/
-static int LOASSyncInfo( decoder_t *p_dec, uint8_t p_header[LOAS_HEADER_SIZE], unsigned int *pi_header_size )
+static int LOASSyncInfo( uint8_t p_header[LOAS_HEADER_SIZE], unsigned int *pi_header_size )
 {
     *pi_header_size = 3;
     return ( ( p_header[1] & 0x1f ) << 8 ) + p_header[2];
@@ -999,7 +999,7 @@ static block_t *PacketizeStreamBlock( decoder_t *p_dec, block_t **pp_block )
                 }
 
                 /* Check if frame is valid and get frame info */
-                p_sys->i_frame_size = LOASSyncInfo( p_dec, p_header, &p_sys->i_header_size );
+                p_sys->i_frame_size = LOASSyncInfo( p_header, &p_sys->i_header_size );
             }
 
             if( p_sys->i_frame_size <= 0 )
index 7bcb597a3466851f2622f185c0c0415978b1de1e..c9b11733755bcd6a83cb1841389f660286afe740 100644 (file)
@@ -66,7 +66,7 @@ struct decoder_sys_t
      */
     block_bytestream_t bytestream;
     int i_state;
-    int i_offset;
+    size_t i_offset;
     uint8_t p_startcode[3];
 
     /*
@@ -167,7 +167,7 @@ static int Open( vlc_object_t *p_this )
 
     /* Misc init */
     p_sys->i_state = STATE_NOSYNC;
-    p_sys->bytestream = block_BytestreamInit( p_dec );
+    p_sys->bytestream = block_BytestreamInit();
     p_sys->p_startcode[0] = 0;
     p_sys->p_startcode[1] = 0;
     p_sys->p_startcode[2] = 1;
@@ -367,7 +367,7 @@ static block_t *ParseMPEGBlock( decoder_t *p_dec, block_t *p_frag )
     if( p_frag->p_buffer[3] >= 0x20 && p_frag->p_buffer[3] <= 0x2f )
     {
         /* Copy the complete VOL */
-        if( p_dec->fmt_out.i_extra != p_frag->i_buffer )
+        if( (size_t)p_dec->fmt_out.i_extra != p_frag->i_buffer )
         {
             p_dec->fmt_out.p_extra =
                 realloc( p_dec->fmt_out.p_extra, p_frag->i_buffer );
index 1cec5e83d31372e9101338a087cd603508fd8f10..19fd9543e36763934dd5e265c6571bd6912839d3 100644 (file)
@@ -88,7 +88,7 @@ struct decoder_sys_t
      */
     block_bytestream_t bytestream;
     int i_state;
-    int i_offset;
+    size_t i_offset;
     uint8_t p_startcode[3];
 
     /* Sequence header and extension */
@@ -166,7 +166,7 @@ static int Open( vlc_object_t *p_this )
 
     /* Misc init */
     p_sys->i_state = STATE_NOSYNC;
-    p_sys->bytestream = block_BytestreamInit( p_dec );
+    p_sys->bytestream = block_BytestreamInit();
     p_sys->p_startcode[0] = 0;
     p_sys->p_startcode[1] = 0;
     p_sys->p_startcode[2] = 1;
index 5a8ca95c850566bb072048b3018a86fc16d4526f..4723ebf0bb57e09412241208413ce095d0364069 100644 (file)
@@ -61,7 +61,7 @@ struct decoder_sys_t
      */
     block_bytestream_t bytestream;
     int i_state;
-    int i_offset;
+    size_t i_offset;
     uint8_t p_startcode[3];
 
     /* Current sequence header */
@@ -137,7 +137,7 @@ static int Open( vlc_object_t *p_this )
     p_dec->p_sys = p_sys = malloc( sizeof( decoder_sys_t ) );
 
     p_sys->i_state = STATE_NOSYNC;
-    p_sys->bytestream = block_BytestreamInit( p_dec );
+    p_sys->bytestream = block_BytestreamInit();
     p_sys->p_startcode[0] = 0x00;
     p_sys->p_startcode[1] = 0x00;
     p_sys->p_startcode[2] = 0x01;
@@ -427,8 +427,8 @@ static block_t *ParseIDU( decoder_t *p_dec, block_t *p_frag )
         if( i_ridu > 4 && (ridu[0]&0x80) == 0 ) /* for advanced profile, the first bit is 1 */
         {
             video_format_t *p_v = &p_dec->fmt_in.video;
-            const int i_potential_width  = GetWBE( &ridu[0] );
-            const int i_potential_height = GetWBE( &ridu[2] );
+            const size_t i_potential_width  = GetWBE( &ridu[0] );
+            const size_t i_potential_height = GetWBE( &ridu[2] );
 
             if( i_potential_width >= 2  && i_potential_width <= 8192 &&
                 i_potential_height >= 2 && i_potential_height <= 8192 )
@@ -494,7 +494,7 @@ static block_t *ParseIDU( decoder_t *p_dec, block_t *p_frag )
                         {64,33}, {160,99},{ 0, 0}, { 0, 0}
                     };
                     int i_ar = bs_read( &s, 4 );
-                    int i_ar_w, i_ar_h;
+                    unsigned i_ar_w, i_ar_h;
 
                     if( i_ar == 15 )
                     {