From 8ee113afa13846c48685a03d4a1b99f4700fd07a Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Tue, 2 Aug 2016 16:16:31 +0200 Subject: lavf/rmdec: Do not return EIO on EOF. Reported-by: applemax82 --- libavformat/rmdec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libavformat/rmdec.c') diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c index 0d3b56f1b5..d1758628ad 100644 --- a/libavformat/rmdec.c +++ b/libavformat/rmdec.c @@ -1044,7 +1044,9 @@ static int rm_read_packet(AVFormatContext *s, AVPacket *pkt) st = s->streams[i]; } - if (len <= 0 || avio_feof(s->pb)) + if (avio_feof(s->pb)) + return AVERROR_EOF; + if (len <= 0) return AVERROR(EIO); res = ff_rm_parse_packet (s, s->pb, st, st->priv_data, len, pkt, -- cgit v1.2.3