-
Notifications
You must be signed in to change notification settings - Fork 597
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix IOProxy::pread on Windows that botched PNG & JPEG read (#2231)
We've been plagued by recently-introduced bugs with PNG and JPEG reading that stemmed from the first IOProxy-related patch. The problem was our use of the Windows ReadFile call, which seems to not preserve the file pointer as we'd assumed (the MSDN docs are ambiguous about this). I also began to doubt its thread safety, so in the end I just replace the code with a simpler approach with a mutex and calls to tell/seek/read. Same changes to pwrite implementation.
- Loading branch information
Showing
3 changed files
with
15 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters