]> git.sesse.net Git - vlc/blobdiff - modules/access/mmap.c
Update LGPL license blurb, choosing v2.1+.
[vlc] / modules / access / mmap.c
index c6116aa8d276f9395211e612acabd03ac3c30cc4..2c7dfbfc3544cb931e1eb32af33893f85cfb2c25 100644 (file)
@@ -27,7 +27,7 @@
 #include <vlc_plugin.h>
 #include <vlc_access.h>
 #include <vlc_input.h>
-#include <vlc_charset.h>
+#include <vlc_fs.h>
 #include <vlc_dialog.h>
 
 #include <assert.h>
@@ -83,18 +83,18 @@ static int Open (vlc_object_t *p_this)
 {
     access_t *p_access = (access_t *)p_this;
     access_sys_t *p_sys;
-    const char *path = p_access->psz_path;
+    const char *path = p_access->psz_filepath;
     int fd;
 
     assert ((INT64_C(1) << 63) == ((off_t)(INT64_C(1) << 63)));
 
-    if (!var_CreateGetBool (p_this, "file-mmap"))
+    if (!var_InheritBool (p_this, "file-mmap"))
         return VLC_EGENERIC; /* disabled */
 
     STANDARD_BLOCK_ACCESS_INIT;
 
     msg_Dbg (p_access, "opening file %s", path);
-    fd = utf8_open (path, O_RDONLY | O_NOCTTY);
+    fd = vlc_open (path, O_RDONLY | O_NOCTTY);
 
     if (fd == -1)
     {
@@ -290,7 +290,7 @@ static int Control (access_t *p_access, int query, va_list args)
 
         case ACCESS_GET_PTS_DELAY:
         {
-            int delay_ms = var_CreateGetInteger (p_access, "file-caching");
+            int64_t delay_ms = var_CreateGetInteger (p_access, "file-caching");
             *va_arg(args, int64_t *) = delay_ms * INT64_C (1000);
             return VLC_SUCCESS;
         }