History

avcodec/aac/aacdec: Remove unnecessary ff_thread_once()

ff_aacdec_common_init_once() already uses its own AVOnce.

Andreas Rheinhardt committed 2 years ago

Commit e4e91441 parent 44474dd1 file · +1 −10Browse files

Unified · Split

libavcodec/aac/aacdec.c+1−10
@@ -61,7 +61,6 @@ · 60 unmodified lines
61#include "libavutil/opt.h"61#include "libavutil/opt.h"
62#include "libavutil/tx.h"62#include "libavutil/tx.h"
63#include "libavutil/version.h"63#include "libavutil/version.h"
64#include "libavutil/thread.h"
65 64
66/*65/*
67 * supported tools66 * supported tools
@@ -1112,12 +1111,6 @@ static int sample_rate_idx (int rate) · 1044 unmodified lines
1112 else return 11;1111 else return 11;
1113}1112}
1114 1113
1115static av_cold void aac_static_table_init(void)
1116{
1117 ff_aacdec_common_init_once();
1118}
1119static AVOnce aac_table_init = AV_ONCE_INIT;
1120
1121static av_cold int decode_close(AVCodecContext *avctx)1114static av_cold int decode_close(AVCodecContext *avctx)
1122{1115{
1123 AACDecContext *ac = avctx->priv_data;1116 AACDecContext *ac = avctx->priv_data;
@@ -1202,9 +1195,7 @@ static av_cold int aac_decode_init_internal(AVCodecContext *avctx) · 78 unmodified lines
1202 if (avctx->sample_rate > 96000)1195 if (avctx->sample_rate > 96000)
1203 return AVERROR_INVALIDDATA;1196 return AVERROR_INVALIDDATA;
1204 1197
1205 ret = ff_thread_once(&aac_table_init, &aac_static_table_init);1198 ff_aacdec_common_init_once();
1206 if (ret != 0)
1207 return AVERROR_UNKNOWN;
1208 1199
1209 ac->avctx = avctx;1200 ac->avctx = avctx;
1210 ac->oc[1].m4ac.sample_rate = avctx->sample_rate;1201 ac->oc[1].m4ac.sample_rate = avctx->sample_rate;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t