diff --git a/stream/stream_file.c b/stream/stream_file.c index 0ba12278ab..4895a8301b 100644 --- a/stream/stream_file.c +++ b/stream/stream_file.c @@ -340,8 +340,15 @@ static int open_f(stream_t *stream, const struct stream_open_args *args) stream->get_size = get_size; stream->close = s_close; - if (check_stream_network(p->fd)) + if (check_stream_network(p->fd)) { stream->streaming = true; +#if HAVE_COCOA + if (fcntl(p->fd, F_RDAHEAD, 0) < 0) { + MP_VERBOSE(stream, "Cannot disable read ahead on file '%s': %s\n", + filename, mp_strerror(errno)); + } +#endif + } p->orig_size = get_size(stream);