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:
parent
d9b6068764
commit
d7366d918f
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user