diff options
author | Clément Bœsch <ubitux@gmail.com> | 2011-10-05 23:44:46 +0200 |
---|---|---|
committer | Clément Bœsch <ubitux@gmail.com> | 2011-10-05 23:45:09 +0200 |
commit | d7366d918ff89e1e5b1ad0d33e688e4484c9c35b (patch) | |
tree | 51fcc830d4879cca4dcd9611dffd35dd7264194e /libavformat/libmodplug.c | |
parent | d9b6068764c1b2e13b0eb67e460e364d86e9f954 (diff) | |
download | ffmpeg-d7366d918ff89e1e5b1ad0d33e688e4484c9c35b.tar.gz |
libmodplug: handle EOF correctly.
Diffstat (limited to 'libavformat/libmodplug.c')
-rw-r--r-- | libavformat/libmodplug.c | 2 |
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; } |