Fixes missing initialization in OpusMSEncoder
authorJean-Marc Valin <jmvalin@jmvalin.ca>
Sun, 5 May 2013 06:22:06 +0000 (02:22 -0400)
committerJean-Marc Valin <jmvalin@jmvalin.ca>
Sun, 5 May 2013 06:22:06 +0000 (02:22 -0400)
Problem found using valgrind.

src/opus_multistream_encoder.c

index 1847bd5..08dff36 100644 (file)
@@ -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;