avcodec/bitstream: zero vlc tables on allocation

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-06-16 18:45:18 +02:00
parent 189ffeafd4
commit 600cbf3672

View File

@ -117,6 +117,7 @@ static int alloc_table(VLC *vlc, int size, int use_static)
vlc->table_size = 0;
return AVERROR(ENOMEM);
}
memset(vlc->table + vlc->table_allocated - (1 << vlc->bits), 0, sizeof(VLC_TYPE) * 2 << vlc->bits);
}
return index;
}