Commit 6f08ac38 authored by rbultje's avatar rbultje

Move "- 12" statement up a bit. See "[PATCH] rmdec.c: prevent zero-length

packets" thread.



git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18117 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 7092231b
...@@ -536,16 +536,13 @@ static int sync(AVFormatContext *s, int64_t *timestamp, int *flags, int *stream_ ...@@ -536,16 +536,13 @@ static int sync(AVFormatContext *s, int64_t *timestamp, int *flags, int *stream_
if(state > (unsigned)0xFFFF || state < 12) if(state > (unsigned)0xFFFF || state < 12)
continue; continue;
len=state; len=state - 12;
state= 0xFFFFFFFF; state= 0xFFFFFFFF;
num = get_be16(pb); num = get_be16(pb);
*timestamp = get_be32(pb); *timestamp = get_be32(pb);
res= get_byte(pb); /* reserved */ res= get_byte(pb); /* reserved */
*flags = get_byte(pb); /* flags */ *flags = get_byte(pb); /* flags */
len -= 12;
} }
for(i=0;i<s->nb_streams;i++) { for(i=0;i<s->nb_streams;i++) {
st = s->streams[i]; st = s->streams[i];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment