[vlc-commits] TS demux: PIDFillFormat doesn't operate on ts_es_t anymore

Rafaël Carré git at videolan.org
Fri May 9 18:08:41 CEST 2014


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Fri May  9 10:47:11 2014 +0200| [a775cc03c19fe4a95d2a04383c7b226fbda4c3d1] | committer: Rafaël Carré

TS demux: PIDFillFormat doesn't operate on ts_es_t anymore

Fix warning:
initialization discards ‘const’ qualifier from pointer target type
     es_format_t *fmt = &es->fmt;

Introduced in 60044057c53a580482fbe515d86bd5bdaa453dae

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

 modules/demux/ts.c |   10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/modules/demux/ts.c b/modules/demux/ts.c
index eed67b8..7673e79 100644
--- a/modules/demux/ts.c
+++ b/modules/demux/ts.c
@@ -343,7 +343,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args );
 
 static void PIDInit ( ts_pid_t *pid, bool b_psi, ts_psi_t *p_owner );
 static void PIDClean( demux_t *, ts_pid_t *pid );
-static void PIDFillFormat( const ts_es_t *es, int i_stream_type );
+static void PIDFillFormat( es_format_t *fmt, int i_stream_type );
 
 static void PATCallBack( void*, dvbpsi_pat_t * );
 static void PMTCallBack( void *data, dvbpsi_pmt_t *p_pmt );
@@ -1294,7 +1294,7 @@ static int UserPmt( demux_t *p_demux, const char *psz_fmt )
             else
             {
                 const int i_stream_type = strtol( psz_opt, NULL, 0 );
-                PIDFillFormat( pid->es, i_stream_type );
+                PIDFillFormat( &pid->es->fmt, i_stream_type );
             }
             pid->es->fmt.i_group = i_number;
             if( p_sys->b_es_id_pid )
@@ -2381,10 +2381,8 @@ static bool GatherData( demux_t *p_demux, ts_pid_t *pid, block_t *p_bk )
     return i_ret;
 }
 
-static void PIDFillFormat( const ts_es_t *es, int i_stream_type )
+static void PIDFillFormat( es_format_t *fmt, int i_stream_type )
 {
-    es_format_t *fmt = &es->fmt;
-
     switch( i_stream_type )
     {
     case 0x01:  /* MPEG-1 video */
@@ -4077,7 +4075,7 @@ static void PMTCallBack( void *data, dvbpsi_pmt_t *p_pmt )
         }
 
         PIDInit( pid, false, pmt->psi );
-        PIDFillFormat( pid->es, p_es->i_type );
+        PIDFillFormat( &pid->es->fmt, p_es->i_type );
         pid->i_owner_number = prg->i_number;
         pid->i_pid          = p_es->i_pid;
         pid->b_seen         = p_sys->pid[p_es->i_pid].b_seen;



More information about the vlc-commits mailing list