mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
siren: Make some local variables non-static for thread-safety
Otherwise we will override values from another thread if we encode or decode frames at the same time in different threads.
This commit is contained in:
parent
80e02cbdf9
commit
a657ba9f3b
2 changed files with 11 additions and 11 deletions
|
@ -82,10 +82,10 @@ Siren7_DecodeFrame (SirenDecoder decoder, unsigned char *DataIn,
|
|||
scale_factor, number_of_regions, sample_rate_code, bits_per_frame;
|
||||
int decoded_sample_rate_code;
|
||||
|
||||
static int absolute_region_power_index[28] = { 0 };
|
||||
static float decoder_standard_deviation[28] = { 0 };
|
||||
static int power_categories[28] = { 0 };
|
||||
static int category_balance[28] = { 0 };
|
||||
int absolute_region_power_index[28] = { 0 };
|
||||
float decoder_standard_deviation[28] = { 0 };
|
||||
int power_categories[28] = { 0 };
|
||||
int category_balance[28] = { 0 };
|
||||
int ChecksumTable[4] = { 0x7F80, 0x7878, 0x6666, 0x5555 };
|
||||
int i, j;
|
||||
|
||||
|
|
|
@ -82,13 +82,13 @@ Siren7_EncodeFrame (SirenEncoder encoder, unsigned char *DataIn,
|
|||
scale_factor, number_of_regions, sample_rate_code, bits_per_frame;
|
||||
int sample_rate = encoder->sample_rate;
|
||||
|
||||
static int absolute_region_power_index[28] = { 0 };
|
||||
static int power_categories[28] = { 0 };
|
||||
static int category_balance[28] = { 0 };
|
||||
static int drp_num_bits[30] = { 0 };
|
||||
static int drp_code_bits[30] = { 0 };
|
||||
static int region_mlt_bit_counts[28] = { 0 };
|
||||
static int region_mlt_bits[112] = { 0 };
|
||||
int absolute_region_power_index[28] = { 0 };
|
||||
int power_categories[28] = { 0 };
|
||||
int category_balance[28] = { 0 };
|
||||
int drp_num_bits[30] = { 0 };
|
||||
int drp_code_bits[30] = { 0 };
|
||||
int region_mlt_bit_counts[28] = { 0 };
|
||||
int region_mlt_bits[112] = { 0 };
|
||||
int ChecksumTable[4] = { 0x7F80, 0x7878, 0x6666, 0x5555 };
|
||||
int i, j;
|
||||
|
||||
|
|
Loading…
Reference in a new issue