[vlc-devel] Mac OS X fcntl patch

Marko Karppinen marko at karppinen.fi
Sat Dec 10 12:50:55 CET 2005

Hi guys,

Index: modules/access/file.c
--- modules/access/file.c       (revision 13659)
+++ modules/access/file.c       (working copy)
@@ -636,5 +636,12 @@
+#ifdef SYS_DARWIN
+    /* We'd rather use any available memory for reading ahead
+     * than for caching what we've already displayed */
+    fcntl(p_sys->fd, F_RDAHEAD, 1);
+    fcntl(p_sys->fd, F_NOCACHE, 1);
      return VLC_SUCCESS;

I've verified that this patch stops OS X from foolishly trying to  
cache the whole file being played. I think I'm also seeing the system  
spend a little less time waiting for my (slow) disk and more in VLC  
decoding frames. YMMV, of course :)


Knox. Simply secure encryption and backup. http://www.knoxformac.com

This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html

More information about the vlc-devel mailing list