input/ffmpeg: use avio_feof(), eliminate eof attribute

This commit is contained in:
Max Kellermann
2019-03-13 10:41:12 +01:00
parent bfb7b0117f
commit cb100f2e5c
2 changed files with 6 additions and 9 deletions

View File

@@ -70,6 +70,11 @@ public:
return avio_size(io_context);
}
gcc_pure
bool IsEOF() const noexcept {
return avio_feof(io_context) != 0;
}
size_t Read(void *buffer, size_t size) {
int result = avio_read_partial(io_context,
(unsigned char *)buffer, size);