Commit 6b407551 authored by Rostislav Pehlivanov's avatar Rostislav Pehlivanov

aacenc: fix broken build with hardcoded tables

ff_aac_tableinit is a macro in the case of hardcoded tables, so wrap
that up in a function (similar to how the decoder template does it) and
use that as the argument for ff_thread_once().
Signed-off-by: 's avatarRostislav Pehlivanov <atomnuker@gmail.com>
parent feb3f396
...@@ -888,6 +888,11 @@ alloc_fail: ...@@ -888,6 +888,11 @@ alloc_fail:
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
} }
static av_cold void aac_encode_init_tables(void)
{
ff_aac_tableinit();
}
static av_cold int aac_encode_init(AVCodecContext *avctx) static av_cold int aac_encode_init(AVCodecContext *avctx)
{ {
AACEncContext *s = avctx->priv_data; AACEncContext *s = avctx->priv_data;
...@@ -989,7 +994,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx) ...@@ -989,7 +994,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
if (HAVE_MIPSDSPR1) if (HAVE_MIPSDSPR1)
ff_aac_coder_init_mips(s); ff_aac_coder_init_mips(s);
if ((ret = ff_thread_once(&aac_table_init, &ff_aac_tableinit)) != 0) if ((ret = ff_thread_once(&aac_table_init, &aac_encode_init_tables)) != 0)
return AVERROR_UNKNOWN; return AVERROR_UNKNOWN;
ff_af_queue_init(avctx, &s->afq); ff_af_queue_init(avctx, &s->afq);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment