changeset 36742:f72673e98df2

Remove pointless casts.
author reimar
date Fri, 14 Feb 2014 22:29:38 +0000
parents f690ce5daaee
children 9249a5caebdf
files libmpdemux/demux_mpg.c
diffstat 1 files changed, 10 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_mpg.c	Fri Feb 14 22:29:37 2014 +0000
+++ b/libmpdemux/demux_mpg.c	Fri Feb 14 22:29:38 2014 +0000
@@ -67,7 +67,7 @@
 static int parse_psm(demuxer_t *demux, int len) {
   unsigned char c, id, type;
   unsigned int plen, prog_len, es_map_len;
-  mpg_demuxer_t *priv = (mpg_demuxer_t *) demux->priv;
+  mpg_demuxer_t *priv = demux->priv;
 
   mp_dbg(MSGT_DEMUX,MSGL_V, "PARSE_PSM, len=%d\n", len);
   if(! len || len > 1018)
@@ -269,10 +269,10 @@
 
 static void new_audio_stream(demuxer_t *demux, int aid){
   if(!demux->a_streams[aid]){
-    mpg_demuxer_t *mpg_d=(mpg_demuxer_t*)demux->priv;
+    mpg_demuxer_t *mpg_d=demux->priv;
     sh_audio_t* sh_a;
     new_sh_audio(demux,aid, NULL);
-    sh_a = (sh_audio_t*)demux->a_streams[aid];
+    sh_a = demux->a_streams[aid];
     sh_a->needs_parsing = 1;
     switch(aid & 0xE0){  // 1110 0000 b  (high 3 bit: type  low 5: id)
       case 0x00: sh_a->format=0x50;break; // mpeg
@@ -300,7 +300,7 @@
   double stream_pts = MP_NOPTS_VALUE;
   demux_stream_t *ds=NULL;
   demux_packet_t* dp;
-  mpg_demuxer_t *priv = (mpg_demuxer_t *) demux->priv;
+  mpg_demuxer_t *priv = demux->priv;
 
   mp_dbg(MSGT_DEMUX,MSGL_DBG3,"demux_read_packet: %X\n",id);
 
@@ -444,7 +444,7 @@
         ds=demux->video;
         if(!ds->sh) ds->sh=demux->v_streams[pes_ext2_subid];
         if(priv && ds->sh) {
-          sh_video_t *sh = (sh_video_t *)ds->sh;
+          sh_video_t *sh = ds->sh;
           sh->format = mmioFOURCC('W', 'V', 'C', '1');
         }
       }
@@ -557,7 +557,7 @@
       ds=demux->audio;
       if(!ds->sh) ds->sh=demux->a_streams[aid];
       if(priv && ds->sh) {
-        sh_audio_t *sh = (sh_audio_t *)ds->sh;
+        sh_audio_t *sh = ds->sh;
         if(priv->es_map[id - 0x1B0])
           sh->format = priv->es_map[id - 0x1B0];
           mp_dbg(MSGT_DEMUX,MSGL_DBG2,"ASSIGNED TO STREAM %d CODEC %x\n", id, priv->es_map[id - 0x1B0]);
@@ -573,7 +573,7 @@
       ds=demux->video;
       if(!ds->sh) ds->sh=demux->v_streams[aid];
       if(priv && ds->sh) {
-        sh_video_t *sh = (sh_video_t *)ds->sh;
+        sh_video_t *sh = ds->sh;
         if(priv->es_map[id - 0x1B0]) {
           sh->format = priv->es_map[id - 0x1B0];
           mp_dbg(MSGT_DEMUX,MSGL_DBG2,"ASSIGNED TO STREAM %d CODEC %x\n", id, priv->es_map[id - 0x1B0]);
@@ -913,7 +913,7 @@
     demux_stream_t *d_video=demuxer->video;
     sh_audio_t *sh_audio=d_audio->sh;
     sh_video_t *sh_video=d_video->sh;
-    mpg_demuxer_t *mpg_d=(mpg_demuxer_t*)demuxer->priv;
+    mpg_demuxer_t *mpg_d=demuxer->priv;
     int precision = 1;
     float oldpts = 0;
     off_t oldpos = demuxer->filepos;
@@ -1016,7 +1016,7 @@
 
 static int demux_mpg_control(demuxer_t *demuxer, int cmd, void *arg)
 {
-    mpg_demuxer_t *mpg_d=(mpg_demuxer_t*)demuxer->priv;
+    mpg_demuxer_t *mpg_d=demuxer->priv;
 
     switch(cmd) {
 	case DEMUXER_CTRL_GET_TIME_LENGTH:
@@ -1057,7 +1057,7 @@
                 for (i = 0; i < mpg_d->num_a_streams; i++)
                   if (*((int*)arg) == mpg_d->a_stream_ids[i]) break;
                 if (i < mpg_d->num_a_streams)
-                  sh_a = (sh_audio_t*)demuxer->a_streams[*((int*)arg)];
+                  sh_a = demuxer->a_streams[*((int*)arg)];
               }
               if (i < mpg_d->num_a_streams && d_audio->id != mpg_d->a_stream_ids[i]) {
                 d_audio->id = mpg_d->a_stream_ids[i];