Commit 8f84e1be authored by Max Kellermann's avatar Max Kellermann

decoder/plugins/FfmpegIo: return AVERROR_EOF at end of file

This part of the AVIOContext API is not documented :-( Closes https://github.com/MusicPlayerDaemon/MPD/issues/1448
parent 9975905f
ver 0.23.6 (not yet released)
* decoder
- ffmpeg: fix end-of-file check (update stuck at empty files)
- opus: fix "readpicture" on Opus files
* output
- pipewire: fix crash bug if setting volume before playback starts
......
......@@ -35,7 +35,11 @@ AvioStream::~AvioStream()
inline int
AvioStream::Read(void *dest, int size)
{
return decoder_read(client, input, dest, size);
const auto nbytes = decoder_read(client, input, dest, size);
if (nbytes == 0)
return AVERROR_EOF;
return nbytes;
}
inline int64_t
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment