From 2c9825d87a9fd0d0742247581ddf7956dd96eda7 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Sun, 12 May 2019 13:10:33 +0000 Subject: ffmpeg: return AVERROR_EOF on file end (#1002) git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@8870 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp b/src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp index 21830daf5..2f0cce082 100644 --- a/src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp +++ b/src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp @@ -35,6 +35,10 @@ extern "C"{ static int ffmpeg_read(void *data, uint8_t *buf, int size) { DecoderFFmpeg *d = (DecoderFFmpeg*)data; +#if (LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(57,84,101)) + if(d->input()->atEnd()) + return AVERROR_EOF; +#endif return (int)d->input()->read((char*)buf, size); } -- cgit v1.2.3-13-gbd6f