From 16bb8247b45a51c06e27e8563d8a546f3dddc79e Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Sun, 15 Nov 2020 20:56:22 +0100 Subject: avcodec/mpegaudiodsp: Make initializing synth windows thread-safe These arrays are used by the Musepack decoders, the MPEG audio decoders as well as qdm2 and up until now, these arrays might be initialized more than once, leading to potential data races as well as unnecessary initializations. Therefore this commit ensures that each array will only be initialized once. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegaudiodsp.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libavcodec/mpegaudiodsp.h') diff --git a/libavcodec/mpegaudiodsp.h b/libavcodec/mpegaudiodsp.h index 4c9b05ebac..4577d515d9 100644 --- a/libavcodec/mpegaudiodsp.h +++ b/libavcodec/mpegaudiodsp.h @@ -67,8 +67,8 @@ void ff_mpadsp_init_x86_tabs(void); void ff_mpadsp_init_mipsfpu(MPADSPContext *s); void ff_mpadsp_init_mipsdsp(MPADSPContext *s); -void ff_mpa_synth_init_float(float *window); -void ff_mpa_synth_init_fixed(int32_t *window); +void ff_mpa_synth_init_float(void); +void ff_mpa_synth_init_fixed(void); void ff_mpadsp_apply_window_float(float *synth_buf, float *window, int *dither_state, float *samples, -- cgit v1.2.3