diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-10-01 20:11:40 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-11-26 00:09:27 +0100 |
| commit | bc6fd8c020ad27c86c463876f76c8add042cb660 (patch) | |
| tree | fab3c338985e46a7297149c2b35f4c2f487f96f3 /src/lib/file_group.cc | |
| parent | 8dfef0f38cc3323bc4a5d90c9102e8d3965496a4 (diff) | |
Return AVERROR_EOF from the avio_read method when appropriate.
Diffstat (limited to 'src/lib/file_group.cc')
| -rw-r--r-- | src/lib/file_group.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/file_group.cc b/src/lib/file_group.cc index 71faacc4c..f4d50028e 100644 --- a/src/lib/file_group.cc +++ b/src/lib/file_group.cc @@ -134,9 +134,8 @@ FileGroup::seek (int64_t pos, int whence) const /** Try to read some data from the current position into a buffer. * @param buffer Buffer to write data into. * @param amount Number of bytes to read. - * @return Number of bytes read. */ -int +FileGroup::Result FileGroup::read (uint8_t* buffer, int amount) const { DCPOMATIC_ASSERT (_current_file); @@ -173,13 +172,13 @@ FileGroup::read (uint8_t* buffer, int amount) const if (eof) { /* See if there is another file to use */ if ((_current_path + 1) >= _paths.size()) { - break; + return { read, true }; } ensure_open_path (_current_path + 1); } } - return read; + return { read, false }; } |
