Commit 07fc4c5d authored by kostya's avatar kostya

pqindex=0 is forbidden

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@11540 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent c87abb47
...@@ -1065,6 +1065,7 @@ static int vc1_parse_frame_header(VC1Context *v, GetBitContext* gb) ...@@ -1065,6 +1065,7 @@ static int vc1_parse_frame_header(VC1Context *v, GetBitContext* gb)
/* Quantizer stuff */ /* Quantizer stuff */
pqindex = get_bits(gb, 5); pqindex = get_bits(gb, 5);
if(!pqindex) return -1;
if (v->quantizer_mode == QUANT_FRAME_IMPLICIT) if (v->quantizer_mode == QUANT_FRAME_IMPLICIT)
v->pq = ff_vc1_pquant_table[0][pqindex]; v->pq = ff_vc1_pquant_table[0][pqindex];
else else
...@@ -1301,6 +1302,7 @@ static int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb) ...@@ -1301,6 +1302,7 @@ static int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb)
} }
} }
pqindex = get_bits(gb, 5); pqindex = get_bits(gb, 5);
if(!pqindex) return -1;
v->pqindex = pqindex; v->pqindex = pqindex;
if (v->quantizer_mode == QUANT_FRAME_IMPLICIT) if (v->quantizer_mode == QUANT_FRAME_IMPLICIT)
v->pq = ff_vc1_pquant_table[0][pqindex]; v->pq = ff_vc1_pquant_table[0][pqindex];
......
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