[FFmpeg-cvslog] libmodplug: handle EOF correctly.

Clément Bœsch git at videolan.org
Wed Oct 5 23:45:19 CEST 2011


ffmpeg | branch: master | Clément Bœsch <ubitux at gmail.com> | Wed Oct  5 23:44:46 2011 +0200| [d7366d918ff89e1e5b1ad0d33e688e4484c9c35b] | committer: Clément Bœsch

libmodplug: handle EOF correctly.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d7366d918ff89e1e5b1ad0d33e688e4484c9c35b
---

 libavformat/libmodplug.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavformat/libmodplug.c b/libavformat/libmodplug.c
index b4978b9..9fc2ec9 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;
 }



More information about the ffmpeg-cvslog mailing list