[vlc-commits] mpeg mux: missing const

Rémi Denis-Courmont git at videolan.org
Sat Feb 21 11:24:21 CET 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Feb 21 11:15:14 2015 +0200| [969f38cb20eff04212ae607e404552cd9b53ab4e] | committer: Rémi Denis-Courmont

mpeg mux: missing const

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

 modules/mux/mpeg/pes.c |    4 ++--
 modules/mux/mpeg/pes.h |    2 +-
 modules/mux/mpeg/ts.c  |    8 ++++----
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/modules/mux/mpeg/pes.c b/modules/mux/mpeg/pes.c
index afe44ab..02551bc 100644
--- a/modules/mux/mpeg/pes.c
+++ b/modules/mux/mpeg/pes.c
@@ -51,7 +51,7 @@
  *                      header in bytes.
  */
 static inline int PESHeader( uint8_t *p_hdr, mtime_t i_pts, mtime_t i_dts,
-                             int i_es_size, es_format_t *p_fmt,
+                             int i_es_size, const es_format_t *p_fmt,
                              int i_stream_id, bool b_mpeg2,
                              bool b_data_alignment, int i_header_size )
 {
@@ -317,7 +317,7 @@ static inline int PESHeader( uint8_t *p_hdr, mtime_t i_pts, mtime_t i_dts,
  *                       VIDEO_ES, set to INT_MAX.
  */
 void EStoPES ( block_t **pp_pes,
-                   es_format_t *p_fmt, int i_stream_id,
+                   const es_format_t *p_fmt, int i_stream_id,
                    int b_mpeg2, int b_data_alignment, int i_header_size,
                    int i_max_pes_size, mtime_t ts_offset )
 {
diff --git a/modules/mux/mpeg/pes.h b/modules/mux/mpeg/pes.h
index 71eb699..0ddaecb 100644
--- a/modules/mux/mpeg/pes.h
+++ b/modules/mux/mpeg/pes.h
@@ -36,6 +36,6 @@
 #define PES_PAYLOAD_SIZE_MAX 65500
 
 void EStoPES ( block_t **pp_pes,
-                   es_format_t *p_fmt, int i_stream_id,
+                   const es_format_t *p_fmt, int i_stream_id,
                    int b_mpeg2, int b_data_alignment, int i_header_size,
                    int i_max_pes_size, mtime_t ts_offset );
diff --git a/modules/mux/mpeg/ts.c b/modules/mux/mpeg/ts.c
index 6531f04..0e8db71 100644
--- a/modules/mux/mpeg/ts.c
+++ b/modules/mux/mpeg/ts.c
@@ -460,7 +460,7 @@ static int DelStream( sout_mux_t *, sout_input_t * );
 static int Mux      ( sout_mux_t * );
 
 static block_t *FixPES( sout_mux_t *p_mux, block_fifo_t *p_fifo );
-static block_t *Add_ADTS( block_t *, es_format_t * );
+static block_t *Add_ADTS( block_t *, const es_format_t * );
 static void TSSchedule  ( sout_mux_t *p_mux, sout_buffer_chain_t *p_chain_ts,
                           mtime_t i_pcr_length, mtime_t i_pcr_dts );
 static void TSDate      ( sout_mux_t *p_mux, sout_buffer_chain_t *p_chain_ts,
@@ -1080,7 +1080,7 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
     else
     {
         /* Copy extra data (VOL for MPEG-4 and extra BitMapInfoHeader for VFW */
-        es_format_t *fmt = p_input->p_fmt;
+        const es_format_t *fmt = p_input->p_fmt;
         if( fmt->i_extra > 0 )
         {
             p_stream->pes.i_extra = fmt->i_extra;
@@ -1667,11 +1667,11 @@ static block_t *FixPES( sout_mux_t *p_mux, block_fifo_t *p_fifo )
     }
 }
 
-static block_t *Add_ADTS( block_t *p_data, es_format_t *p_fmt )
+static block_t *Add_ADTS( block_t *p_data, const es_format_t *p_fmt )
 {
 #define ADTS_HEADER_SIZE 7 /* CRC needs 2 more bytes */
 
-    uint8_t *p_extra = p_fmt->p_extra;
+    const uint8_t *p_extra = p_fmt->p_extra;
 
     if( !p_data || p_fmt->i_extra < 2 || !p_extra )
         return p_data; /* no data to construct the headers */



More information about the vlc-commits mailing list