summaryrefslogtreecommitdiffstats
path: root/libavcodec/ac3enc_float.c
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2014-06-11 05:32:01 -0700
committerDiego Biurrun <diego@biurrun.de>2014-06-13 05:21:34 -0700
commit27631796c9d1b8146ad4a16e6539ecc08afa7565 (patch)
treeeeca9c7373dad7e0e23420ff4f1dd7529a5e7140 /libavcodec/ac3enc_float.c
parentf0ce9913d0974ac0c7371a62c3324dd2863b5d1b (diff)
downloadffmpeg-streaming-27631796c9d1b8146ad4a16e6539ecc08afa7565.zip
ffmpeg-streaming-27631796c9d1b8146ad4a16e6539ecc08afa7565.tar.gz
ac3: Only initialize float_dsp for the float encoder variant
Diffstat (limited to 'libavcodec/ac3enc_float.c')
-rw-r--r--libavcodec/ac3enc_float.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libavcodec/ac3enc_float.c b/libavcodec/ac3enc_float.c
index 03b782c..6b6290f 100644
--- a/libavcodec/ac3enc_float.c
+++ b/libavcodec/ac3enc_float.c
@@ -124,6 +124,12 @@ static CoefType calc_cpl_coord(CoefSumType energy_ch, CoefSumType energy_cpl)
return FFMIN(coord, COEF_MAX);
}
+av_cold int ff_ac3_float_encode_init(AVCodecContext *avctx)
+{
+ AC3EncodeContext *s = avctx->priv_data;
+ avpriv_float_dsp_init(&s->fdsp, avctx->flags & CODEC_FLAG_BITEXACT);
+ return ff_ac3_encode_init(avctx);
+}
AVCodec ff_ac3_encoder = {
.name = "ac3",
@@ -131,7 +137,7 @@ AVCodec ff_ac3_encoder = {
.type = AVMEDIA_TYPE_AUDIO,
.id = AV_CODEC_ID_AC3,
.priv_data_size = sizeof(AC3EncodeContext),
- .init = ff_ac3_encode_init,
+ .init = ff_ac3_float_encode_init,
.encode2 = ff_ac3_float_encode_frame,
.close = ff_ac3_encode_close,
.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLTP,
OpenPOWER on IntegriCloud