Commit b71f62a9 authored by Rostislav Pehlivanov's avatar Rostislav Pehlivanov

opusenc: initialize the emphasis coefficients on init

Signed-off-by: 's avatarRostislav Pehlivanov <atomnuker@gmail.com>
parent 4bc7268f
......@@ -1077,6 +1077,9 @@ static av_cold int opus_encode_init(AVCodecContext *avctx)
if ((ret = ff_mdct15_init(&s->mdct[i], 0, i + 3, 68 << (CELT_BLOCK_NB - 1 - i))))
return AVERROR(ENOMEM);
for (i = 0; i < OPUS_MAX_FRAMES_PER_PACKET; i++)
s->frame[i].block[0].emph_coeff = s->frame[i].block[1].emph_coeff = 0.0f;
/* Zero out previous energy (matters for inter first frame) */
for (ch = 0; ch < s->channels; ch++)
for (i = 0; i < CELT_MAX_BANDS; i++)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment