[vlc-commits] caf: remove redundant casts

Rémi Denis-Courmont git at videolan.org
Wed Apr 19 19:49:37 CEST 2017


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Apr 19 20:34:37 2017 +0300| [0de54570db62cf117f7763c9123cc12eb1fbdaa6] | committer: Rémi Denis-Courmont

caf: remove redundant casts

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

 modules/demux/caf.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/modules/demux/caf.c b/modules/demux/caf.c
index 5bdfb73275..49ff9fe86e 100644
--- a/modules/demux/caf.c
+++ b/modules/demux/caf.c
@@ -1013,22 +1013,22 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
             return VLC_SUCCESS;
 
         case DEMUX_GET_LENGTH:
-            pi64 = ( int64_t* )va_arg( args, int64_t * );
+            pi64 = va_arg( args, int64_t * );
             *pi64 = CLOCK_FREQ * ( i_num_samples / p_sys->fmt.audio.i_rate );
             return VLC_SUCCESS;
 
         case DEMUX_GET_TIME:
-            pi64 = ( int64_t* )va_arg( args, int64_t * );
+            pi64 = va_arg( args, int64_t * );
             *pi64 = CLOCK_FREQ * ( p_sys->position.i_samples / p_sys->fmt.audio.i_rate );
             return VLC_SUCCESS;
 
         case DEMUX_GET_POSITION:
-            pf = (double*)va_arg( args, double * );
+            pf = va_arg( args, double * );
             *pf = i_num_samples ? (double)p_sys->position.i_samples / (double)i_num_samples : 0.0;
             return VLC_SUCCESS;
 
         case DEMUX_SET_POSITION:
-            f = (double)va_arg( args, double );
+            f = va_arg( args, double );
             i_sample = f * i_num_samples;
             if( SetSpanWithSample( p_demux, &position, i_sample ))
                 return VLC_EGENERIC;
@@ -1036,7 +1036,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
             return VLC_SUCCESS;
 
         case DEMUX_SET_TIME:
-            i64 = (int64_t)va_arg( args, int64_t );
+            i64 = va_arg( args, int64_t );
             i_sample = i64 * p_sys->fmt.audio.i_rate / INT64_C( 1000000 );
             if( SetSpanWithSample( p_demux, &position, i_sample ))
                 return VLC_EGENERIC;



More information about the vlc-commits mailing list