summaryrefslogtreecommitdiff
path: root/libavcodec/ac3enc_fixed.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-12-03 03:36:32 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2021-01-09 04:06:31 +0100
commit953924781ee1e928a7e5657231998713d2a9f3ac (patch)
treed3f15b0881d6e5d6896335518823869667fabca0 /libavcodec/ac3enc_fixed.c
parent505d4de064aff879674d0670cf1c96ca46545da3 (diff)
avcodec/ac3enc: Set function pointers earlier
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/ac3enc_fixed.c')
-rw-r--r--libavcodec/ac3enc_fixed.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libavcodec/ac3enc_fixed.c b/libavcodec/ac3enc_fixed.c
index d2e67f3214..879e364d4e 100644
--- a/libavcodec/ac3enc_fixed.c
+++ b/libavcodec/ac3enc_fixed.c
@@ -115,7 +115,7 @@ static CoefType calc_cpl_coord(CoefSumType energy_ch, CoefSumType energy_cpl)
*
* @param s AC-3 encoder private context
*/
-av_cold void ff_ac3_fixed_mdct_end(AC3EncodeContext *s)
+static av_cold void ac3_fixed_mdct_end(AC3EncodeContext *s)
{
ff_mdct_end(&s->mdct);
}
@@ -127,7 +127,7 @@ av_cold void ff_ac3_fixed_mdct_end(AC3EncodeContext *s)
* @param s AC-3 encoder private context
* @return 0 on success, negative error code on failure
*/
-av_cold int ff_ac3_fixed_mdct_init(AC3EncodeContext *s)
+static av_cold int ac3_fixed_mdct_init(AC3EncodeContext *s)
{
int ret = ff_mdct_init(&s->mdct, 9, 0, -1.0);
s->mdct_window = ff_ac3_window;
@@ -139,6 +139,9 @@ static av_cold int ac3_fixed_encode_init(AVCodecContext *avctx)
{
AC3EncodeContext *s = avctx->priv_data;
s->fixed_point = 1;
+ s->mdct_end = ac3_fixed_mdct_end;
+ s->mdct_init = ac3_fixed_mdct_init;
+ s->allocate_sample_buffers = allocate_sample_buffers;
return ff_ac3_encode_init(avctx);
}