Skip to content

frame: use a more Win32 friendly version of reading a file in memory

Steve Lhomme requested to merge robUx4/vlc:file-frame into master

It's only used when the file cannot be mapped in memory.

This was not a real implementation of pread. As the comment suggests, the original offset was not respected. But we don't care in this case as we want to read the whole file from start to end.

pread doesn't exist on Windows nor in mingw-w64. So let's not pretend we can do it properly.


v2:

  • move the code directly in the loop
  • mention it's not canceleable
  • clean error handling
Edited by Steve Lhomme

Merge request reports