summaryrefslogtreecommitdiff
path: root/src/lib/file_group.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-10-01 20:11:40 +0200
committerCarl Hetherington <cth@carlh.net>2022-11-26 00:09:27 +0100
commitbc6fd8c020ad27c86c463876f76c8add042cb660 (patch)
treefab3c338985e46a7297149c2b35f4c2f487f96f3 /src/lib/file_group.h
parent8dfef0f38cc3323bc4a5d90c9102e8d3965496a4 (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.h12
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: