From b042935693914fffb930e38facca1bac80ece1a5 Mon Sep 17 00:00:00 2001
From: Jean-Marc Valin <jmvalin@jmvalin.ca>
Date: Sun, 5 May 2013 02:22:06 -0400
Subject: [PATCH] Fixes missing initialization in OpusMSEncoder

Problem found using valgrind.
---
 src/opus_multistream_encoder.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/opus_multistream_encoder.c b/src/opus_multistream_encoder.c
index 1847bd5ae..08dff3631 100644
--- a/src/opus_multistream_encoder.c
+++ b/src/opus_multistream_encoder.c
@@ -105,6 +105,8 @@ int opus_multistream_encoder_init(
    st->layout.nb_channels = channels;
    st->layout.nb_streams = streams;
    st->layout.nb_coupled_streams = coupled_streams;
+   st->subframe_mem[0]=st->subframe_mem[1]=st->subframe_mem[2]=0;
+   OPUS_CLEAR(&st->analysis,1);
 
    st->bitrate_bps = OPUS_AUTO;
    st->variable_duration = OPUS_FRAMESIZE_ARG;
-- 
GitLab