diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2003-04-12 15:00:32 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2003-04-12 15:00:32 +0000 |
commit | 487bce53ebe2761a20e88837b8d903a30d370aa0 (patch) | |
tree | d522dae93bf0b740802650dd125289e1df5cb88b /libavcodec/wmv2.c | |
parent | 6692d61b120c5e1723476222cd349051f2a7c3de (diff) | |
download | ffmpeg-487bce53ebe2761a20e88837b8d903a30d370aa0.tar.gz |
10l (use before malloc)
Originally committed as revision 1768 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/wmv2.c')
-rw-r--r-- | libavcodec/wmv2.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/libavcodec/wmv2.c b/libavcodec/wmv2.c index 1097b7c29c..f4caa5aa25 100644 --- a/libavcodec/wmv2.c +++ b/libavcodec/wmv2.c @@ -349,7 +349,7 @@ static int decode_ext_header(Wmv2Context *w){ int ff_wmv2_decode_picture_header(MpegEncContext * s) { Wmv2Context * const w= (Wmv2Context*)s; - int code, i; + int code; #if 0 { @@ -370,6 +370,15 @@ return -1; printf("I7:%X/\n", code); } s->qscale = get_bits(&s->gb, 5); + if(s->qscale < 0) + return -1; + + return 0; +} + +int ff_wmv2_decode_secondary_picture_header(MpegEncContext * s) +{ + Wmv2Context * const w= (Wmv2Context*)s; if (s->pict_type == I_TYPE) { if(w->j_type_bit) w->j_type= get_bits1(&s->gb); |