Mercurial > libavcodec.hg
diff wmv2.c @ 1183:03b97d87dcdd libavcodec
10l (use before malloc)
author | michaelni |
---|---|
date | Sat, 12 Apr 2003 15:00:32 +0000 |
parents | fea03d2c4946 |
children | 9da267732f68 |
line wrap: on
line diff
--- a/wmv2.c Fri Apr 11 22:53:03 2003 +0000 +++ b/wmv2.c Sat Apr 12 15:00:32 2003 +0000 @@ -349,7 +349,7 @@ int ff_wmv2_decode_picture_header(MpegEncContext * s) { Wmv2Context * const w= (Wmv2Context*)s; - int code, i; + int code; #if 0 { @@ -370,6 +370,15 @@ 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);