diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-10-01 20:11:40 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-10-19 14:44:01 +0200 |
| commit | a21e2c4cf36824ced303996762f83de3530c85a6 (patch) | |
| tree | 0de03571bb7848043e72c6dff0e773a3384c14f9 /src/lib/ffmpeg.cc | |
| parent | e2a18f23bde577c73f4ef3da47b903ed41091eda (diff) | |
Return AVERROR_EOF from the avio_read method when appropriate.
Diffstat (limited to 'src/lib/ffmpeg.cc')
| -rw-r--r-- | src/lib/ffmpeg.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/ffmpeg.cc b/src/lib/ffmpeg.cc index 6c8509b6c..8220962d6 100644 --- a/src/lib/ffmpeg.cc +++ b/src/lib/ffmpeg.cc @@ -273,7 +273,11 @@ FFmpeg::subtitle_codec_context () const int FFmpeg::avio_read (uint8_t* buffer, int const amount) { - return _file_group.read (buffer, amount); + auto result = _file_group.read(buffer, amount); + if (result.eof && result.bytes_read == 0) { + return AVERROR_EOF; + } + return result.bytes_read; } |
