[vlc-devel] commit: Remove dead initialization. ( Rémi Duraffort )

git version control git at videolan.org
Fri Jun 19 10:40:12 CEST 2009


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Fri Jun 19 10:20:11 2009 +0200| [940ac1f04f364f4fe7e8e0463e762d4df1972ec5] | committer: Rémi Duraffort 

Remove dead initialization.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=940ac1f04f364f4fe7e8e0463e762d4df1972ec5
---

 modules/audio_filter/converter/a52tofloat32.c |    4 ++--
 modules/codec/avcodec/encoder.c               |    2 +-
 modules/codec/speex.c                         |    7 +++----
 modules/codec/spudec/parse.c                  |    2 +-
 modules/codec/theora.c                        |    4 ++--
 5 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/modules/audio_filter/converter/a52tofloat32.c b/modules/audio_filter/converter/a52tofloat32.c
index 083caf7..f496b26 100644
--- a/modules/audio_filter/converter/a52tofloat32.c
+++ b/modules/audio_filter/converter/a52tofloat32.c
@@ -3,7 +3,7 @@
  *   This plugin makes use of liba52 to decode A/52 audio
  *   (http://liba52.sf.net/).
  *****************************************************************************
- * Copyright (C) 2001, 2002 the VideoLAN team
+ * Copyright (C) 2001-2009 the VideoLAN team
  * $Id$
  *
  * Authors: Gildas Bazin <gbazin at videolan.org>
@@ -119,7 +119,7 @@ vlc_module_end ()
 static int Create( vlc_object_t *p_this )
 {
     aout_filter_t *p_filter = (aout_filter_t *)p_this;
-    filter_sys_t *p_sys = (filter_sys_t *)p_filter->p_sys;
+    filter_sys_t *p_sys;
     int i_ret;
 
     if ( p_filter->input.i_format != VLC_CODEC_A52
diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c
index 86b44ba..503f032 100644
--- a/modules/codec/avcodec/encoder.c
+++ b/modules/codec/avcodec/encoder.c
@@ -200,7 +200,7 @@ static const uint16_t mpeg4_default_non_intra_matrix[64] = {
 int OpenEncoder( vlc_object_t *p_this )
 {
     encoder_t *p_enc = (encoder_t *)p_this;
-    encoder_sys_t *p_sys = p_enc->p_sys;
+    encoder_sys_t *p_sys;
     AVCodecContext *p_context;
     AVCodec *p_codec;
     int i_codec_id, i_cat;
diff --git a/modules/codec/speex.c b/modules/codec/speex.c
index 564a87c..68a5f28 100644
--- a/modules/codec/speex.c
+++ b/modules/codec/speex.c
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * speex.c: speex decoder/packetizer/encoder module making use of libspeex.
  *****************************************************************************
- * Copyright (C) 2003-2008 the VideoLAN team
+ * Copyright (C) 2003-2009 the VideoLAN team
  * $Id$
  *
  * Authors: Gildas Bazin <gbazin at videolan.org>
@@ -203,14 +203,13 @@ static block_t *Encode   ( encoder_t *, aout_buffer_t * );
 static int OpenDecoder( vlc_object_t *p_this )
 {
     decoder_t *p_dec = (decoder_t*)p_this;
-    decoder_sys_t *p_sys = p_dec->p_sys;
+    decoder_sys_t *p_sys;
 
     if( p_dec->fmt_in.i_codec != VLC_CODEC_SPEEX )
         return VLC_EGENERIC;
 
     /* 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 )
+    if( ( p_dec->p_sys = p_sys = malloc(sizeof(decoder_sys_t)) ) == NULL )
         return VLC_ENOMEM;
     p_dec->p_sys->bits.buf_size = 0;
     p_dec->p_sys->b_packetizer = false;
diff --git a/modules/codec/spudec/parse.c b/modules/codec/spudec/parse.c
index c61674a..5287272 100644
--- a/modules/codec/spudec/parse.c
+++ b/modules/codec/spudec/parse.c
@@ -161,7 +161,7 @@ static int ParseControlSeq( decoder_t *p_dec, subpicture_t *p_spu,
     decoder_sys_t *p_sys = p_dec->p_sys;
 
     /* Our current index in the SPU packet */
-    unsigned int i_index = p_sys->i_rle_size + 4;
+    unsigned int i_index;
 
     /* The next start-of-control-sequence index and the previous one */
     unsigned int i_next_seq = 0, i_cur_seq = 0;
diff --git a/modules/codec/theora.c b/modules/codec/theora.c
index 934c683..3ac5f12 100644
--- a/modules/codec/theora.c
+++ b/modules/codec/theora.c
@@ -602,7 +602,7 @@ struct encoder_sys_t
 static int OpenEncoder( vlc_object_t *p_this )
 {
     encoder_t *p_enc = (encoder_t *)p_this;
-    encoder_sys_t *p_sys = p_enc->p_sys;
+    encoder_sys_t *p_sys;
     ogg_packet header;
     uint8_t *p_extra;
     vlc_value_t val;
@@ -615,7 +615,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 )
+    if( ( p_sys = malloc(sizeof(encoder_sys_t)) ) == NULL )
         return VLC_ENOMEM;
     p_enc->p_sys = p_sys;
 




More information about the vlc-devel mailing list