aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorRostislav Pehlivanov <atomnuker@gmail.com>2017-05-10 06:07:46 +0100
committerRostislav Pehlivanov <atomnuker@gmail.com>2017-05-16 11:22:07 +0100
commite6ec482b429b241de0fb3088d87e28777d70ded5 (patch)
tree1edd002b9b37d8b2d3a4015a9f5b7372270e747b /libavcodec
parent376247a1028f0d143b737b409983a18cd9c4dd8a (diff)
downloadffmpeg-e6ec482b429b241de0fb3088d87e28777d70ded5.tar.gz
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>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/opusenc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/opusenc.c b/libavcodec/opusenc.c
index 5f5700ea50..41e1a3fb38 100644
--- a/libavcodec/opusenc.c
+++ b/libavcodec/opusenc.c
@@ -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++)