summaryrefslogtreecommitdiff
path: root/libavcodec/ac3enc_float.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/ac3enc_float.c')
-rw-r--r--libavcodec/ac3enc_float.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/ac3enc_float.c b/libavcodec/ac3enc_float.c
index d2435dee15..4f61440b52 100644
--- a/libavcodec/ac3enc_float.c
+++ b/libavcodec/ac3enc_float.c
@@ -93,8 +93,10 @@ static int normalize_samples(AC3EncodeContext *s)
*/
static void scale_coefficients(AC3EncodeContext *s)
{
- s->ac3dsp.float_to_fixed24(s->fixed_coef_buffer, s->mdct_coef_buffer,
- AC3_MAX_COEFS * AC3_MAX_BLOCKS * s->channels);
+ int chan_size = AC3_MAX_COEFS * AC3_MAX_BLOCKS;
+ s->ac3dsp.float_to_fixed24(s->fixed_coef_buffer + chan_size,
+ s->mdct_coef_buffer + chan_size,
+ chan_size * s->channels);
}