[FFmpeg-devel] [PATCH]lavf/rmdec: Do not return EIO on EOF

Carl Eugen Hoyos cehoyos at ag.or.at
Tue May 10 15:08:25 CEST 2016


Hi!

Attached patch fixes an incorrect error message and an incorrect failure on 
xerror as reported by applemax82 on both user mailing lists.

Please comment, Carl Eugen
-------------- next part --------------
diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
index cb0481e..a633582 100644
--- a/libavformat/rmdec.c
+++ b/libavformat/rmdec.c
@@ -1043,7 +1043,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,


More information about the ffmpeg-devel mailing list