]> git.sesse.net Git - vlc/commitdiff
Fix warnings in lpcm, cc and theora
authorJean-Baptiste Kempf <jb@videolan.org>
Wed, 19 Aug 2009 21:07:35 +0000 (23:07 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Wed, 19 Aug 2009 21:43:13 +0000 (23:43 +0200)
modules/codec/cc.c
modules/codec/lpcm.c
modules/codec/theora.c

index cb1dc4b5e0aa0463ea48fdf743763b917af54448..b53a84f5c10b89ad72b43884f4c53e8523a7807e 100644 (file)
@@ -618,7 +618,7 @@ static void Eia608ParseChannel( eia608_t *h, const uint8_t d[2] )
 
     /* */
     const int d1 = d[0] & 0x7f;
-    const int d2 = d[1] & 0x7f;
+    // const int d2 = d[1] & 0x7f;
     if( d1 == 0x14 )
         h->i_channel = 1;
     else if( d1 == 0x1c )
@@ -1143,5 +1143,6 @@ static char *Eia608Text( eia608_t *h, bool b_html )
 
 static void Eia608Exit( eia608_t *h )
 {
+    VLC_UNUSED( h );
 }
 
index fa7a1afffe40608087b567a1d67c790fb8aaf048..97685df968adcd33b7ca1407c774db461a539a90 100644 (file)
@@ -289,12 +289,11 @@ static void *DecodeFrame( decoder_t *p_dec, block_t **pp_block )
     }
 
     int i_ret;
-    unsigned i_padding;
+    unsigned i_padding = 0;
     aob_group_t p_aob_group[2];
     switch( p_sys->i_type )
     {
     case LPCM_VOB:
-        i_padding = 0;
         i_ret = VobHeader( &i_rate, &i_channels, &i_original_channels, &i_bits,
                            p_block->p_buffer );
         break;
@@ -303,13 +302,12 @@ static void *DecodeFrame( decoder_t *p_dec, block_t **pp_block )
                            p_aob_group,
                            p_block->p_buffer );
         break;
-    default:
-        assert(0);
     case LPCM_BD:
-        i_padding = 0;
         i_ret = BdHeader( &i_rate, &i_channels, &i_original_channels, &i_bits,
                           p_block->p_buffer );
         break;
+    default:
+        assert(0);
     }
 
     if( i_ret || p_block->i_buffer <= p_sys->i_header_size + i_padding )
@@ -792,7 +790,7 @@ static void AobExtract( aout_buffer_t *p_aout_buffer,
         for( int i = 0; i < 2; i++ )
         {
             const aob_group_t *g = &p_group[1-i];
-            const int i_group_size = 2 * g->i_channels * i_bits / 8;
+            const unsigned int i_group_size = 2 * g->i_channels * i_bits / 8;
 
             if( p_block->i_buffer < i_group_size )
             {
index 83c4a545811517ce20ee822ecf531d3cc83a8929..97e90ca3e1cf56020628d9af82d1519b1b16b372 100644 (file)
@@ -82,7 +82,7 @@ static void *ProcessPacket ( decoder_t *, ogg_packet *, block_t ** );
 static picture_t *DecodePacket( decoder_t *, ogg_packet * );
 
 static void ParseTheoraComments( decoder_t * );
-static void theora_CopyPicture( decoder_t *, picture_t *, yuv_buffer * );
+static void theora_CopyPicture( picture_t *, yuv_buffer * );
 
 static int  OpenEncoder( vlc_object_t *p_this );
 static void CloseEncoder( vlc_object_t *p_this );
@@ -498,7 +498,7 @@ static picture_t *DecodePacket( decoder_t *p_dec, ogg_packet *p_oggpacket )
     p_pic = decoder_NewPicture( p_dec );
     if( !p_pic ) return NULL;
 
-    theora_CopyPicture( p_dec, p_pic, &yuv );
+    theora_CopyPicture( p_pic, &yuv );
 
     p_pic->date = p_sys->i_pts;
 
@@ -553,7 +553,7 @@ static void CloseDecoder( vlc_object_t *p_this )
  * theora_CopyPicture: copy a picture from theora internal buffers to a
  *                     picture_t structure.
  *****************************************************************************/
-static void theora_CopyPicture( decoder_t *p_dec, picture_t *p_pic,
+static void theora_CopyPicture( picture_t *p_pic,
                                 yuv_buffer *yuv )
 {
     int i_plane, i_line, i_dst_stride, i_src_stride;