aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2008-01-16 17:07:34 +0000
committerKostya Shishkov <kostya.shishkov@gmail.com>2008-01-16 17:07:34 +0000
commit95e3fdb846847dd91d3a04bebbdefcab48813d83 (patch)
tree5f66ba58d1d97e503c2103a69033ed6e3bfc6f8e /libavcodec
parent9ccbc672aa341d3cb4c4159e1e746ef0693ee138 (diff)
downloadffmpeg-95e3fdb846847dd91d3a04bebbdefcab48813d83.tar.gz
pqindex=0 is forbidden
Originally committed as revision 11540 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/vc1.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c
index 46987c8b48..86ca7b978b 100644
--- a/libavcodec/vc1.c
+++ b/libavcodec/vc1.c
@@ -1065,6 +1065,7 @@ static int vc1_parse_frame_header(VC1Context *v, GetBitContext* gb)
/* Quantizer stuff */
pqindex = get_bits(gb, 5);
+ if(!pqindex) return -1;
if (v->quantizer_mode == QUANT_FRAME_IMPLICIT)
v->pq = ff_vc1_pquant_table[0][pqindex];
else
@@ -1301,6 +1302,7 @@ static int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb)
}
}
pqindex = get_bits(gb, 5);
+ if(!pqindex) return -1;
v->pqindex = pqindex;
if (v->quantizer_mode == QUANT_FRAME_IMPLICIT)
v->pq = ff_vc1_pquant_table[0][pqindex];