From e75e603c1a5d1b56b6297d2cbc1f32e6bf7b2b15 Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Sat, 21 Mar 2009 19:18:07 +0000 Subject: [PATCH] Move "- 12" statement up a bit. See "[PATCH] rmdec.c: prevent zero-length packets" thread. Originally committed as revision 18117 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/rmdec.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c index 5d8270159b..deccd3b0e7 100644 --- a/libavformat/rmdec.c +++ b/libavformat/rmdec.c @@ -536,16 +536,13 @@ static int sync(AVFormatContext *s, int64_t *timestamp, int *flags, int *stream_ if(state > (unsigned)0xFFFF || state < 12) continue; - len=state; + len=state - 12; state= 0xFFFFFFFF; num = get_be16(pb); *timestamp = get_be32(pb); res= get_byte(pb); /* reserved */ *flags = get_byte(pb); /* flags */ - - - len -= 12; } for(i=0;inb_streams;i++) { st = s->streams[i];