[FFmpeg-cvslog] avcodec/aac/aacdec: Remove unnecessary ff_thread_once()

Andreas Rheinhardt git at videolan.org
Tue May 7 01:08:14 EEST 2024


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Mon May  6 11:31:55 2024 +0200| [e4e9144a5c6fbf42c0d48bbd323c12bc7d5409d8] | committer: Andreas Rheinhardt

avcodec/aac/aacdec: Remove unnecessary ff_thread_once()

ff_aacdec_common_init_once() already uses its own AVOnce.

Reviewed-by: Lynne <dev at lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e4e9144a5c6fbf42c0d48bbd323c12bc7d5409d8
---

 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 c6b93e33a2..64ac0ff88b 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"
 
 /*
  * 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;



More information about the ffmpeg-cvslog mailing list