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
6161 #include "libavutil/opt.h"
6262 #include "libavutil/tx.h"
6363 #include "libavutil/version.h"
64−#include "libavutil/thread.h"
6564
6665 /*
6766 * supported tools
@@ -1112,12 +1111,6 @@ static int sample_rate_idx (int rate) · 1044 unmodified lines
11121111 else return 11;
11131112 }
11141113
1115−static av_cold void aac_static_table_init(void)
1116−{
1117− ff_aacdec_common_init_once();
1118−}
1119−static AVOnce aac_table_init = AV_ONCE_INIT;
1120−
11211114 static av_cold int decode_close(AVCodecContext *avctx)
11221115 {
11231116 AACDecContext *ac = avctx->priv_data;
@@ -1202,9 +1195,7 @@ static av_cold int aac_decode_init_internal(AVCodecContext *avctx) · 78 unmodified lines
12021195 if (avctx->sample_rate > 96000)
12031196 return AVERROR_INVALIDDATA;
12041197
1205− ret = ff_thread_once(&aac_table_init, &aac_static_table_init);
1206− if (ret != 0)
1207− return AVERROR_UNKNOWN;
1198+ ff_aacdec_common_init_once();
12081199
12091200 ac->avctx = avctx;
12101201 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