From cbb5da57cdaf547e47253beef31ddf38d181252a Mon Sep 17 00:00:00 2001 From: Reimar Döffinger Date: Sun, 13 Sep 2009 11:08:59 +0000 Subject: When resetting vst->pkt.data to NULL, also set vst->slices. This avoids a crash when the next slice is not a start slice and thus pkt->data is still NULL. This probably only happens with broken or unsupported files like http://samples.mplayerhq.hu/real/multirate/JustaSpa1937_64kb.rm that need further fixes, but keeping vst state consistent is still a good idea. Originally committed as revision 19830 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/rmdec.c | 1 + 1 file changed, 1 insertion(+) (limited to 'libavformat/rmdec.c') diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c index 10e7c2a3df..8cf98c25b5 100644 --- a/libavformat/rmdec.c +++ b/libavformat/rmdec.c @@ -637,6 +637,7 @@ static int rm_assemble_video_frame(AVFormatContext *s, ByteIOContext *pb, pkt->size = vst->videobufpos + 8*(vst->cur_slice - vst->slices); pkt->pts = AV_NOPTS_VALUE; pkt->pos = vst->pktpos; + vst->slices = 0; return 0; } -- cgit v1.2.3