1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-02-09 14:14:39 +02:00

libmodplug: handle EOF correctly.

This commit is contained in:
Clément Bœsch 2011-10-05 23:44:46 +02:00
parent d9b6068764
commit d7366d918f

View File

@ -74,7 +74,7 @@ static int modplug_read_packet(AVFormatContext *s, AVPacket *pkt)
pkt->size = ModPlug_Read(modplug->f, pkt->data, 512); pkt->size = ModPlug_Read(modplug->f, pkt->data, 512);
if (pkt->size <= 0) { if (pkt->size <= 0) {
av_free_packet(pkt); av_free_packet(pkt);
return AVERROR(EIO); return pkt->size == 0 ? AVERROR_EOF : AVERROR(EIO);
} }
return 0; return 0;
} }