summaryrefslogtreecommitdiff
path: root/libavformat/rmdec.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2009-03-21 19:18:07 +0000
committerRonald S. Bultje <rsbultje@gmail.com>2009-03-21 19:18:07 +0000
commite75e603c1a5d1b56b6297d2cbc1f32e6bf7b2b15 (patch)
tree971c35f724a03d238a954e09bcef925d12c7d319 /libavformat/rmdec.c
parentee6624ef4ab7e8b9f1154b2747490c662e2a97a6 (diff)
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
Diffstat (limited to 'libavformat/rmdec.c')
-rw-r--r--libavformat/rmdec.c5
1 files changed, 1 insertions, 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;i<s->nb_streams;i++) {
st = s->streams[i];