From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> To: ffmpeg-devel@ffmpeg.org Cc: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Subject: [FFmpeg-devel] [PATCH 04/12] avcodec/aac/aacdec: Remove unnecessary ff_thread_once() Date: Mon, 6 May 2024 14:14:26 +0200 Message-ID: <GV1P250MB073735620DAD3A5AB48564008F1C2@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM> (raw) In-Reply-To: <GV1P250MB0737A4218AC17DD0A60E579C8F1C2@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM> ff_aacdec_common_init_once() already uses its own AVOnce. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@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 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2024-05-06 12:14 UTC|newest] Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-05-06 9:29 [FFmpeg-devel] [PATCH 1/3] avcodec/aactab: Provide ff_ltp_coef, ff_tns_tmp2_map unconditionally Andreas Rheinhardt 2024-05-06 9:30 ` [FFmpeg-devel] [PATCH 2/3] avcodec/aacsbr: Fix type mismatch Andreas Rheinhardt 2024-05-06 17:54 ` Lynne 2024-05-06 9:30 ` [FFmpeg-devel] [PATCH 3/3] avcodec/aac/aacdec: Fix linking errors with only one decoder enabled Andreas Rheinhardt 2024-05-06 14:03 ` [FFmpeg-devel] [PATCH v2 3/12] " Andreas Rheinhardt 2024-05-06 17:53 ` [FFmpeg-devel] [PATCH 3/3] " Lynne 2024-05-06 19:39 ` Andreas Rheinhardt 2024-05-06 20:00 ` Lynne 2024-05-06 20:08 ` Andreas Rheinhardt 2024-05-06 12:14 ` Andreas Rheinhardt [this message] 2024-05-06 12:14 ` [FFmpeg-devel] [PATCH 05/12] avcodec/aac/aacdec: Move channel number check out of init_dsp() Andreas Rheinhardt 2024-05-06 12:14 ` [FFmpeg-devel] [PATCH 06/12] avcodec/aac/aacdec: Avoid branch to set sample_fmt Andreas Rheinhardt 2024-05-06 12:14 ` [FFmpeg-devel] [PATCH 07/12] avcodec/aac/aacdec_float: Call ff_aac_float_common_init() only once Andreas Rheinhardt 2024-05-06 12:14 ` [FFmpeg-devel] [PATCH 08/12] avcodec/aac/aacdec_(fixed|float): Avoid AAC_RENAME, INTFLOAT Andreas Rheinhardt 2024-05-06 12:14 ` [FFmpeg-devel] [PATCH 09/12] avcodec/aac/aacdec: Mark flush as cold Andreas Rheinhardt 2024-05-06 12:14 ` [FFmpeg-devel] [PATCH 10/12] avcodec/aac/aacdec: Avoid compiling latm decoder if disabled Andreas Rheinhardt 2024-05-06 12:14 ` [FFmpeg-devel] [PATCH 11/12] avcodec/aac/aacdec: Move init functions to aacdec_fixed/float Andreas Rheinhardt 2024-05-06 12:14 ` [FFmpeg-devel] [PATCH 12/12] avcodec/aac/aacdec_(fixed|float): Set AACDecDSP, AACDecProc directly Andreas Rheinhardt 2024-05-06 17:59 ` Lynne
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=GV1P250MB073735620DAD3A5AB48564008F1C2@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM \ --to=andreas.rheinhardt@outlook.com \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git