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
This commit is contained in:
Ronald S. Bultje 2009-03-21 19:18:07 +00:00
parent ee6624ef4a
commit e75e603c1a
1 changed files with 1 additions and 4 deletions

View File

@ -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;i<s->nb_streams;i++) {
st = s->streams[i];