lavf/rmdec: Do not return EIO on EOF.
authorCarl Eugen Hoyos <cehoyos@ag.or.at>
Tue, 2 Aug 2016 14:16:31 +0000 (16:16 +0200)
committerCarl Eugen Hoyos <cehoyos@ag.or.at>
Tue, 2 Aug 2016 14:16:31 +0000 (16:16 +0200)
Reported-by: applemax82
libavformat/rmdec.c

index 0d3b56f..d175862 100644 (file)
@@ -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,