summaryrefslogtreecommitdiff
path: root/libavcodec/ac3enc.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2011-07-13 15:12:11 -0400
committerJustin Ruggles <justin.ruggles@gmail.com>2011-07-13 16:55:28 -0400
commitb5849f77095439e994b11c25e6063d443b36c228 (patch)
tree9728b5e7cda89d104e65ff8fed68155697a6c845 /libavcodec/ac3enc.c
parent82cea7cb6c38e251f88fbf090cd5361f5d0a49de (diff)
downloadffmpeg-b5849f77095439e994b11c25e6063d443b36c228.tar.gz
ac3enc: merge AC3MDCTContext with AC3EncodeContext.
Since both the fixed-point and floating-point encoders use the FFTContext, this no longer needs to be in a separate context. Also, when a short-transform context is added, the same MDCT window will be used.
Diffstat (limited to 'libavcodec/ac3enc.c')
-rw-r--r--libavcodec/ac3enc.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c
index f6a3b31160..fb4d33441e 100644
--- a/libavcodec/ac3enc.c
+++ b/libavcodec/ac3enc.c
@@ -1836,8 +1836,7 @@ av_cold int ff_ac3_encode_close(AVCodecContext *avctx)
av_freep(&block->cpl_coord_mant);
}
- s->mdct_end(s->mdct);
- av_freep(&s->mdct);
+ s->mdct_end(s);
av_freep(&avctx->coded_frame);
return 0;
@@ -2242,8 +2241,7 @@ av_cold int ff_ac3_encode_init(AVCodecContext *avctx)
bit_alloc_init(s);
- FF_ALLOCZ_OR_GOTO(avctx, s->mdct, sizeof(AC3MDCTContext), init_fail);
- ret = s->mdct_init(avctx, s->mdct, 9);
+ ret = s->mdct_init(s);
if (ret)
goto init_fail;