[vlc-commits] stream: code factor for STREAM_GET_SIZE

Rémi Denis-Courmont git at videolan.org
Fri Jul 24 15:21:56 CEST 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Jul 24 16:08:57 2015 +0300| [6dc585352b49299cde8996656329df174161ac10] | committer: Rémi Denis-Courmont

stream: code factor for STREAM_GET_SIZE

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

 src/input/stream_access.c |    9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/src/input/stream_access.c b/src/input/stream_access.c
index 14cbbd9..74169bb 100644
--- a/src/input/stream_access.c
+++ b/src/input/stream_access.c
@@ -389,6 +389,7 @@ static int AStreamControl( stream_t *s, int i_query, va_list args )
     static_control_match(CAN_FASTSEEK);
     static_control_match(CAN_PAUSE);
     static_control_match(CAN_CONTROL_PACE);
+    static_control_match(GET_SIZE);
     static_control_match(GET_PTS_DELAY);
     static_control_match(GET_TITLE_INFO);
     static_control_match(GET_TITLE);
@@ -409,6 +410,7 @@ static int AStreamControl( stream_t *s, int i_query, va_list args )
         case STREAM_CAN_FASTSEEK:
         case STREAM_CAN_PAUSE:
         case STREAM_CAN_CONTROL_PACE:
+        case STREAM_GET_SIZE:
         case STREAM_GET_PTS_DELAY:
         case STREAM_GET_TITLE_INFO:
         case STREAM_GET_TITLE:
@@ -422,13 +424,6 @@ static int AStreamControl( stream_t *s, int i_query, va_list args )
         case STREAM_GET_PRIVATE_ID_STATE:
             return access_vaControl( p_access, i_query, args );
 
-        case STREAM_GET_SIZE:
-        {
-            uint64_t *pi_64 = va_arg( args, uint64_t * );
-            *pi_64 = access_GetSize( p_access );
-            break;
-        }
-
         case STREAM_GET_POSITION:
             *va_arg( args, uint64_t * ) = p_sys->i_pos;
             break;



More information about the vlc-commits mailing list