aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/libmodplug.c
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2011-10-05 23:44:46 +0200
committerClément Bœsch <ubitux@gmail.com>2011-10-05 23:45:09 +0200
commitd7366d918ff89e1e5b1ad0d33e688e4484c9c35b (patch)
tree51fcc830d4879cca4dcd9611dffd35dd7264194e /libavformat/libmodplug.c
parentd9b6068764c1b2e13b0eb67e460e364d86e9f954 (diff)
downloadffmpeg-d7366d918ff89e1e5b1ad0d33e688e4484c9c35b.tar.gz
libmodplug: handle EOF correctly.
Diffstat (limited to 'libavformat/libmodplug.c')
-rw-r--r--libavformat/libmodplug.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/libmodplug.c b/libavformat/libmodplug.c
index b4978b9c2d..9fc2ec9384 100644
--- a/libavformat/libmodplug.c
+++ b/libavformat/libmodplug.c
@@ -74,7 +74,7 @@ static int modplug_read_packet(AVFormatContext *s, AVPacket *pkt)
pkt->size = ModPlug_Read(modplug->f, pkt->data, 512);
if (pkt->size <= 0) {
av_free_packet(pkt);
- return AVERROR(EIO);
+ return pkt->size == 0 ? AVERROR_EOF : AVERROR(EIO);
}
return 0;
}