[vlc-commits] sdp: implement ACCESS_GET_SIZE

Rémi Denis-Courmont git at videolan.org
Mon Aug 31 17:45:08 CEST 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Aug 31 18:38:26 2015 +0300| [c355964de865c8b46e33ba66973b606c8594721d] | committer: Rémi Denis-Courmont

sdp: implement ACCESS_GET_SIZE

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

 modules/access/sdp.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/modules/access/sdp.c b/modules/access/sdp.c
index 643be26..5d9ef7a 100644
--- a/modules/access/sdp.c
+++ b/modules/access/sdp.c
@@ -107,6 +107,8 @@ static int Seek (access_t *access, uint64_t position)
 
 static int Control (access_t *access, int query, va_list args)
 {
+    access_sys_t *sys = access->p_sys;
+
     switch (query)
     {
         case ACCESS_CAN_SEEK:
@@ -119,6 +121,10 @@ static int Control (access_t *access, int query, va_list args)
             return VLC_SUCCESS;
         }
 
+        case ACCESS_GET_SIZE:
+            *va_arg(args, uint64_t *) = sys->length;
+            return VLC_SUCCESS;
+
         case ACCESS_GET_PTS_DELAY:
         {
             int64_t *dp = va_arg(args, int64_t *);



More information about the vlc-commits mailing list