[vlc-commits] input: small simplification

Rémi Denis-Courmont git at videolan.org
Tue Apr 16 18:02:56 CEST 2013


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Apr 16 18:59:01 2013 +0300| [6bc22466776b3d511282c7a6f4ea3e8cab126458] | committer: Rémi Denis-Courmont

input: small simplification

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

 src/input/stream.c |   13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/src/input/stream.c b/src/input/stream.c
index 5124621..4bb1295 100644
--- a/src/input/stream.c
+++ b/src/input/stream.c
@@ -548,7 +548,6 @@ static int AStreamControl( stream_t *s, int i_query, va_list args )
     stream_sys_t *p_sys = s->p_sys;
     access_t     *p_access = p_sys->p_access;
 
-    bool     *p_bool;
     uint64_t *pi_64, i_64;
     int      i_int;
 
@@ -568,14 +567,10 @@ static int AStreamControl( stream_t *s, int i_query, va_list args )
             break;
 
         case STREAM_CAN_SEEK:
-            p_bool = (bool*)va_arg( args, bool * );
-            access_Control( p_access, ACCESS_CAN_SEEK, p_bool );
-            break;
+            return access_vaControl( p_access, ACCESS_CAN_SEEK, args );
 
         case STREAM_CAN_FASTSEEK:
-            p_bool = (bool*)va_arg( args, bool * );
-            access_Control( p_access, ACCESS_CAN_FASTSEEK, p_bool );
-            break;
+            return access_vaControl( p_access, ACCESS_CAN_FASTSEEK, args );
 
         case STREAM_GET_POSITION:
             pi_64 = va_arg( args, uint64_t * );
@@ -619,8 +614,8 @@ static int AStreamControl( stream_t *s, int i_query, va_list args )
             return VLC_SUCCESS;
 
         case STREAM_GET_CONTENT_TYPE:
-            return access_Control( p_access, ACCESS_GET_CONTENT_TYPE,
-                                    va_arg( args, char ** ) );
+            return access_vaControl( p_access, ACCESS_GET_CONTENT_TYPE, args );
+
         case STREAM_SET_RECORD_STATE:
         default:
             msg_Err( s, "invalid stream_vaControl query=0x%x", i_query );



More information about the vlc-commits mailing list