diff options
author | Måns Rullgård <mans@mansr.com> | 2009-03-16 20:22:39 +0000 |
---|---|---|
committer | Måns Rullgård <mans@mansr.com> | 2009-03-16 20:22:39 +0000 |
commit | c3df4a3bfefbab046829bb1fc7d7a2d85e4344fc (patch) | |
tree | a391733597c9908ddb6463bde85b2ea12b85725f | |
parent | 9a10a0767c42733ca9415eca1bd164841ac1728a (diff) | |
download | ffmpeg-c3df4a3bfefbab046829bb1fc7d7a2d85e4344fc.tar.gz |
rmdec: fix crash at end of file
Originally committed as revision 18018 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/rmdec.c | 3 |
1 files changed, 2 insertions, 1 deletions
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)) |