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 0d04503..220d5e7 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:
             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;
             return VLC_SUCCESS;
+        }
 
         case ACCESS_GET_TITLE_INFO:
         case ACCESS_GET_META:
 
         case ACCESS_GET_TITLE_INFO:
         case ACCESS_GET_META: