1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

avcodec/aac/aacdec: Remove unnecessary ff_thread_once()

ff_aacdec_common_init_once() already uses its own AVOnce.

Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2024-05-06 11:31:55 +02:00
parent 44474dd7b9
commit e4e9144a5c

View File

@ -61,7 +61,6 @@
#include "libavutil/opt.h"
#include "libavutil/tx.h"
#include "libavutil/version.h"
#include "libavutil/thread.h"
/*
* supported tools
@ -1112,12 +1111,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;
@ -1202,9 +1195,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;