diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-10-01 20:11:40 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-10-12 09:40:36 +0200 |
| commit | 5c3e10e42031776a21032dfeb07bd8992a0955a2 (patch) | |
| tree | cb6e984a8a7e3deea38cf2a1d08308b1425505ca /src/lib/file_group.h | |
| parent | 285fc9b2f1c1e2a42b1adaf4b39a3317b296d30e (diff) | |
Return AVERROR_EOF from the avio_read method when appropriate.
Diffstat (limited to 'src/lib/file_group.h')
| -rw-r--r-- | src/lib/file_group.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/lib/file_group.h b/src/lib/file_group.h index 693bf89ba..aac72c228 100644 --- a/src/lib/file_group.h +++ b/src/lib/file_group.h @@ -49,8 +49,18 @@ public: void set_paths (std::vector<boost::filesystem::path> const &); + struct Result { + Result(int bytes_read_, bool eof_) + : bytes_read(bytes_read_) + , eof(eof_) + {} + + int bytes_read = 0; + bool eof = false; + }; + int64_t seek (int64_t, int) const; - int read (uint8_t*, int) const; + Result read (uint8_t*, int) const; int64_t length () const; private: |
