diff options
-rw-r--r-- | libavformat/rmdec.c | 4 |
1 files changed, 3 insertions, 1 deletions
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, |