[vlc-commits] mtp: do not turn off caching (refs #8446)

Rémi Denis-Courmont git at videolan.org
Wed Apr 17 19:07:38 CEST 2013


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Apr 17 20:05:08 2013 +0300| [3fd2e22de46253c123b9e367ce3e3b4ea5e8bebd] | committer: Rémi Denis-Courmont

mtp: do not turn off caching (refs #8446)

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

 modules/access/mtp.c |   14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/modules/access/mtp.c b/modules/access/mtp.c
index 1c40f70..baf90c5 100644
--- a/modules/access/mtp.c
+++ b/modules/access/mtp.c
@@ -292,17 +292,11 @@ static int open_file( access_t *p_access, const char *path )
                         _( "VLC could not open the file \"%s\". (%m)" ), path );
         return -1;
     }
-
-#if defined( HAVE_FCNTL )
-    /* We'd rather use any available memory for reading ahead
-     * than for caching what we've already seen/heard */
-# if defined( F_RDAHEAD )
+#ifdef F_RDAHEAD
     fcntl( fd, F_RDAHEAD, 1 );
-# endif
-# if defined( F_NOCACHE )
-    fcntl( fd, F_NOCACHE, 1 );
-# endif
 #endif
-
+#ifdef F_NOCACHE
+    fcntl( fd, F_NOCACHE, 0 );
+#endif
     return fd;
 }



More information about the vlc-commits mailing list