[FFmpeg-cvslog] aacenc: fix broken build with hardcoded tables

Rostislav Pehlivanov git at videolan.org
Fri Nov 27 22:26:43 CET 2015


ffmpeg | branch: master | Rostislav Pehlivanov <atomnuker at gmail.com> | Fri Nov 27 21:24:42 2015 +0000| [6b407551588b4fc7fc9400bbdd131e692e6ae85e] | committer: 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: Rostislav Pehlivanov <atomnuker at gmail.com>

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

 libavcodec/aacenc.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c
index e49cf4b..0bd8891 100644
--- a/libavcodec/aacenc.c
+++ b/libavcodec/aacenc.c
@@ -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);



More information about the ffmpeg-cvslog mailing list