[vlc-commits] Remove write-only block_t.i_rate

Rémi Denis-Courmont git at videolan.org
Thu Aug 25 21:40:58 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Aug 25 18:54:12 2011 +0300| [cf1498fbbea930f08a58a2b1954f007ce6613491] | committer: Rémi Denis-Courmont

Remove write-only block_t.i_rate

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

 include/vlc_block.h                     |    3 ---
 modules/audio_filter/converter/format.c |    1 -
 modules/demux/mkv/mkv.cpp               |    1 -
 src/input/decoder.c                     |    3 +--
 src/input/es_out.c                      |    2 --
 src/input/es_out_timeshift.c            |    1 -
 src/misc/block.c                        |    2 --
 7 files changed, 1 insertions(+), 12 deletions(-)

diff --git a/include/vlc_block.h b/include/vlc_block.h
index ce8d8e4..60092e3 100644
--- a/include/vlc_block.h
+++ b/include/vlc_block.h
@@ -40,7 +40,6 @@
  * - i_dts/i_pts could be VLC_TS_INVALID, it means no pts/dts
  * - i_length: length in microseond of the packet, can be null except in the
  *      sout where it is mandatory.
- * - i_rate 0 or a valid input rate, look at vlc_input.h
  *
  * - i_buffer number of valid data pointed by p_buffer
  *      you can freely decrease it but never increase it yourself
@@ -111,7 +110,6 @@ struct block_t
     mtime_t     i_length;
 
     unsigned    i_nb_samples; /* Used for audio */
-    int         i_rate;
 
     size_t      i_buffer;
     uint8_t     *p_buffer;
@@ -153,7 +151,6 @@ static inline block_t *block_Duplicate( block_t *p_block )
     p_dup->i_pts     = p_block->i_pts;
     p_dup->i_flags   = p_block->i_flags;
     p_dup->i_length  = p_block->i_length;
-    p_dup->i_rate    = p_block->i_rate;
     p_dup->i_nb_samples = p_block->i_nb_samples;
     memcpy( p_dup->p_buffer, p_block->p_buffer, p_block->i_buffer );
 
diff --git a/modules/audio_filter/converter/format.c b/modules/audio_filter/converter/format.c
index 0fc91c4..44e26ff 100644
--- a/modules/audio_filter/converter/format.c
+++ b/modules/audio_filter/converter/format.c
@@ -184,7 +184,6 @@ static block_t *Filter(filter_t *filter, block_t *block)
             out->i_dts        = block->i_dts;
             out->i_pts        = block->i_pts;
             out->i_length     = block->i_length;
-            out->i_rate       = block->i_rate;
 
             sys->indirects[i](out, block);
 
diff --git a/modules/demux/mkv/mkv.cpp b/modules/demux/mkv/mkv.cpp
index 88c84d5..8b238b9 100644
--- a/modules/demux/mkv/mkv.cpp
+++ b/modules/demux/mkv/mkv.cpp
@@ -458,7 +458,6 @@ static block_t *MemToBlock( uint8_t *p_mem, size_t i_mem, size_t offset)
     if( likely(p_block != NULL) )
     {
         memcpy( p_block->p_buffer + offset, p_mem, i_mem );
-        //p_block->i_rate = p_input->stream.control.i_rate;
     }
     return p_block;
 }
diff --git a/src/input/decoder.c b/src/input/decoder.c
index c193d63..47f8b80 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -1704,8 +1704,7 @@ static void DecoderPlaySout( decoder_t *p_dec, block_t *p_sout_block,
         p_sout_block->p_next = NULL;
 
         DecoderFixTs( p_dec, &p_sout_block->i_dts, &p_sout_block->i_pts,
-                      &p_sout_block->i_length,
-                      &p_sout_block->i_rate, INT64_MAX, b_telx );
+                      &p_sout_block->i_length, NULL, INT64_MAX, b_telx );
 
         vlc_mutex_unlock( &p_owner->lock );
 
diff --git a/src/input/es_out.c b/src/input/es_out.c
index 1bb92bc..fe0f4f0 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -1960,8 +1960,6 @@ static int EsOutSend( es_out_t *out, es_out_id_t *es, block_t *p_block )
             p_block->i_flags |= BLOCK_FLAG_PREROLL;
     }
 
-    p_block->i_rate = 0;
-
     if( !es->p_dec )
     {
         block_Release( p_block );
diff --git a/src/input/es_out_timeshift.c b/src/input/es_out_timeshift.c
index d2d9b43..68947db 100644
--- a/src/input/es_out_timeshift.c
+++ b/src/input/es_out_timeshift.c
@@ -1190,7 +1190,6 @@ static void TsStoragePopCmd( ts_storage_t *p_storage, ts_cmd_t *p_cmd, bool b_fl
                 p_block->i_pts      = block.i_pts;
                 p_block->i_flags    = block.i_flags;
                 p_block->i_length   = block.i_length;
-                p_block->i_rate     = block.i_rate;
                 p_block->i_nb_samples = block.i_nb_samples;
                 p_block->i_buffer = fread( p_block->p_buffer, 1, block.i_buffer, p_storage->p_filer );
             }
diff --git a/src/misc/block.c b/src/misc/block.c
index 9a463dd..9732134 100644
--- a/src/misc/block.c
+++ b/src/misc/block.c
@@ -64,7 +64,6 @@ void block_Init( block_t *restrict b, void *buf, size_t size )
     b->i_pts =
     b->i_dts = VLC_TS_INVALID;
     b->i_length = 0;
-    b->i_rate = 0;
     b->i_nb_samples = 0;
     b->p_buffer = buf;
     b->i_buffer = size;
@@ -85,7 +84,6 @@ static void BlockMetaCopy( block_t *restrict out, const block_t *in )
     out->i_pts     = in->i_pts;
     out->i_flags   = in->i_flags;
     out->i_length  = in->i_length;
-    out->i_rate    = in->i_rate;
     out->i_nb_samples = in->i_nb_samples;
 }
 



More information about the vlc-commits mailing list