Browse Source

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: Rostislav Pehlivanov <atomnuker@gmail.com>
tags/n3.0
Rostislav Pehlivanov 10 years ago
parent
commit
6b40755158
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      libavcodec/aacenc.c

+ 6
- 1
libavcodec/aacenc.c View File

@@ -888,6 +888,11 @@ alloc_fail:
return AVERROR(ENOMEM);
}

static av_cold void aac_encode_init_tables(void)
{
ff_aac_tableinit();
}

static av_cold int aac_encode_init(AVCodecContext *avctx)
{
AACEncContext *s = avctx->priv_data;
@@ -989,7 +994,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
if (HAVE_MIPSDSPR1)
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;

ff_af_queue_init(avctx, &s->afq);


Loading…
Cancel
Save