Browse Source

opusenc: initialize PVQ prng seed

Fixes valgrind warnings, didn't affect anything since it was only used
for resynthesis.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
tags/n3.4
Rostislav Pehlivanov 8 years ago
parent
commit
e6ec482b42
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      libavcodec/opusenc.c

+ 3
- 1
libavcodec/opusenc.c View File

@@ -1083,8 +1083,10 @@ 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++)
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;
s->frame[i].seed = 0;
}

/* Zero out previous energy (matters for inter first frame) */
for (ch = 0; ch < s->channels; ch++)


Loading…
Cancel
Save