From c3df4a3bfefbab046829bb1fc7d7a2d85e4344fc Mon Sep 17 00:00:00 2001 From: =?utf8?q?M=C3=A5ns=20Rullg=C3=A5rd?= Date: Mon, 16 Mar 2009 20:22:39 +0000 Subject: [PATCH] rmdec: fix crash at end of file Originally committed as revision 18018 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/rmdec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c index 4ec6d88d4..a1c0906d4 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)) -- 2.34.1