[FFmpeg-devel] [PATCH 04/12] avcodec/aac/aacdec: Remove unnecessary ff_thread_once()
Andreas Rheinhardt
andreas.rheinhardt at outlook.com
Mon May 6 15:14:26 EEST 2024
ff_aacdec_common_init_once() already uses its own AVOnce.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
libavcodec/aac/aacdec.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/libavcodec/aac/aacdec.c b/libavcodec/aac/aacdec.c
index 6a74b05168..f6a7266123 100644
--- a/libavcodec/aac/aacdec.c
+++ b/libavcodec/aac/aacdec.c
@@ -61,7 +61,6 @@
#include "libavutil/opt.h"
#include "libavutil/tx.h"
#include "libavutil/version.h"
-#include "libavutil/thread.h"
#if CONFIG_AAC_DECODER && CONFIG_AAC_FIXED_DECODER
#define IS_FIXED(is_fixed) (is_fixed)
@@ -1120,12 +1119,6 @@ static int sample_rate_idx (int rate)
else return 11;
}
-static av_cold void aac_static_table_init(void)
-{
- ff_aacdec_common_init_once();
-}
-static AVOnce aac_table_init = AV_ONCE_INIT;
-
static av_cold int decode_close(AVCodecContext *avctx)
{
AACDecContext *ac = avctx->priv_data;
@@ -1209,9 +1202,7 @@ static av_cold int aac_decode_init_internal(AVCodecContext *avctx)
if (avctx->sample_rate > 96000)
return AVERROR_INVALIDDATA;
- ret = ff_thread_once(&aac_table_init, &aac_static_table_init);
- if (ret != 0)
- return AVERROR_UNKNOWN;
+ ff_aacdec_common_init_once();
ac->avctx = avctx;
ac->oc[1].m4ac.sample_rate = avctx->sample_rate;
--
2.40.1
More information about the ffmpeg-devel
mailing list