diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c index 98e773ca44..96b9e7f238 100644 --- a/libavformat/rmdec.c +++ b/libavformat/rmdec.c @@ -969,7 +969,7 @@ static int rm_read_packet(AVFormatContext *s, AVPacket *pkt) st = s->streams[i]; } - if(len<0 || avio_feof(s->pb)) + if (len <= 0 || avio_feof(s->pb)) return AVERROR(EIO); res = ff_rm_parse_packet (s, s->pb, st, st->priv_data, len, pkt,