mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-12-18 00:46:51 +00:00
mlp: Only initialize VLC tables once. This caused a crash when multiple
instances of the decoder were started at different times. Bug reported by Maxim Anisiutkin. Originally committed as revision 20254 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
33815fa106
commit
7fd8806924
@ -155,6 +155,7 @@ static VLC huff_vlc[3];
|
||||
|
||||
static av_cold void init_static(void)
|
||||
{
|
||||
if (!huff_vlc[0].bits) {
|
||||
INIT_VLC_STATIC(&huff_vlc[0], VLC_BITS, 18,
|
||||
&ff_mlp_huffman_tables[0][0][1], 2, 1,
|
||||
&ff_mlp_huffman_tables[0][0][0], 2, 1, 512);
|
||||
@ -164,6 +165,7 @@ static av_cold void init_static(void)
|
||||
INIT_VLC_STATIC(&huff_vlc[2], VLC_BITS, 15,
|
||||
&ff_mlp_huffman_tables[2][0][1], 2, 1,
|
||||
&ff_mlp_huffman_tables[2][0][0], 2, 1, 512);
|
||||
}
|
||||
|
||||
ff_mlp_init_crc();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user