aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2019-05-12 13:10:33 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2019-05-12 13:10:33 +0000
commit2c9825d87a9fd0d0742247581ddf7956dd96eda7 (patch)
tree64756f1c932475de47da3937d5cde4fa6d3b74ef /src
parent276e2812df63848805f5a871cbf860dbf2082709 (diff)
downloadqmmp-2c9825d87a9fd0d0742247581ddf7956dd96eda7.tar.gz
qmmp-2c9825d87a9fd0d0742247581ddf7956dd96eda7.tar.bz2
qmmp-2c9825d87a9fd0d0742247581ddf7956dd96eda7.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/plugins/Input/ffmpeg/decoder_ffmpeg.cpp4
1 files changed, 4 insertions, 0 deletions
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);
}