]> git.sesse.net Git - vlc/commitdiff
mmap: allow tweaking the PTS delay
authorRémi Denis-Courmont <rdenis@simphalempin.com>
Tue, 16 Sep 2008 15:52:31 +0000 (18:52 +0300)
committerRémi Denis-Courmont <rdenis@simphalempin.com>
Tue, 16 Sep 2008 15:52:31 +0000 (18:52 +0300)
(The PTS delay thing should be dynamically automatically computed -
 for every access - however, IMHO)

modules/access/mmap.c

index 0d0450334285f29b22fd8903b3f2cf958ff86f8c..220d5e7fd3442393ae2556277ef3fac93425f6c5 100644 (file)
@@ -281,8 +281,11 @@ static int Control (access_t *p_access, int query, va_list args)
             return VLC_SUCCESS;
 
         case ACCESS_GET_PTS_DELAY:
-            *((int64_t *)va_arg (args, int64_t *)) = DEFAULT_PTS_DELAY;
+        {
+            int delay_ms = var_CreateGetInteger (p_access, "file-caching");
+            *((int64_t *)va_arg (args, int64_t *)) = delay_ms * INT64_C (1000);
             return VLC_SUCCESS;
+        }
 
         case ACCESS_GET_TITLE_INFO:
         case ACCESS_GET_META: