1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

mpeg12enc: Don't set up run-level info for level 0.

run: The number of zero coefficients preceding a non-zero coefficient,
in the scan order. The absolute value of the non-zero coefficient is
called "level".

The run-level code makes illegal reads when trying to set up tables for
nonsense level 0.
This commit is contained in:
Alex Converse 2011-11-03 15:56:37 -07:00
parent a1684cf82d
commit 7c5dfc174b

View File

@ -74,6 +74,8 @@ static void init_uni_ac_vlc(RLTable *rl, uint8_t *uni_ac_vlc_len){
for(i=0; i<128; i++){ for(i=0; i<128; i++){
int level= i-64; int level= i-64;
int run; int run;
if (!level)
continue;
for(run=0; run<64; run++){ for(run=0; run<64; run++){
int len, bits, code; int len, bits, code;