[vlc-devel] [vlc-commits] access/file: don't read-ahead when processing remote contents ( closes #9885, refs #8446)

Tobias Güntner fatbull at web.de
Sun May 3 12:29:25 CEST 2015

Am 28.11.2014 um 13:21 schrieb Rémi Denis-Courmont:
> Le 2014-11-28 14:01, Jean-Baptiste Kempf a écrit :
>> On 25 Nov, Tobias Güntner wrote :
>>> I think this applies to vdr as well so I moved the code in a helper
>>> function. Works for me but it still needs to be tested on OS X.
>> This email is confusing in the way you sent it, to be honest.

What's wrong with it?

>>> Subject: [PATCH 1/3] Move remote file check to core
>> Needs Rémi OK, but LGTM.
> I don't really see the point. In any case, there should be no path
> argument w.r.t. ToCToU.

Then someone ought to fix the file module on Windows because the ToCToU 
bug is already in there as far as I can tell...

>>> Subject: [PATCH 2/3] Create helper function to set readahead and caching
>>> +VLC_API void vlc_optimize_read( int fd, const char *path );
>> This name is not cool.
>> Rémi?
> I think it's pointless. Read-ahead should not be enabled blindly, and
> this is only done on MacOS.

That *is* the point. Read-ahead should not be enabled blindly.

The file module reads files and so does the VDR module. If there is a 
reason to *disable* read-ahead in file.c on OS X, this reason applies to 
vdr.c on OS X as well, doesn't it?

IMHO both modules should always use the same settings for read-ahead, 
caching, etc. Hence the helper function(s). Or is there a better way to 
achieve that?


More information about the vlc-devel mailing list