Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
filehandle: Add missing avio_read error check
Rather than return an error when reading fails part way though, avio_read returns those bytes and fails on the *next* read. This can cause weird stuff to happen, like calculating wrong file signatures due to partial reads, when used over a network. To figure out if there was a partial read due to an error, we need to check avio_feof, which for some reason not only checks for EOF but also for all read/write errors, by its own docs. This only tells us *if* there was an error, or EOF, though, so we must also check the contents of avio->error after that. Signed-off-by: Derek Buitenhuis <[email protected]>
- Loading branch information