diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c index 4ec6d88d48..a1c0906d46 100644 --- a/libavformat/rmdec.c +++ b/libavformat/rmdec.c @@ -774,7 +774,8 @@ static int rm_read_packet(AVFormatContext *s, AVPacket *pkt) flags = (seq++ == 1) ? 2 : 0; } else { len=sync(s, ×tamp, &flags, &i, &pos); - st = s->streams[i]; + if (len > 0) + st = s->streams[i]; } if(len<0 || url_feof(s->pb))