From 3514a87b371385cdc71a2ed36deb40cd0275fff5 Mon Sep 17 00:00:00 2001 From: reduz Date: Thu, 8 Oct 2015 14:50:18 -0300 Subject: fixed uninitialized memory issues in audio code --- drivers/speex/audio_stream_speex.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'drivers/speex/audio_stream_speex.cpp') diff --git a/drivers/speex/audio_stream_speex.cpp b/drivers/speex/audio_stream_speex.cpp index 2440969345..1bb4952cc8 100644 --- a/drivers/speex/audio_stream_speex.cpp +++ b/drivers/speex/audio_stream_speex.cpp @@ -22,7 +22,7 @@ int AudioStreamPlaybackSpeex::mix(int16_t* p_buffer,int p_frames) { //printf("update, loops %i, read ofs %i\n", (int)loops, read_ofs); //printf("playing %i, paused %i\n", (int)playing, (int)paused); - if (!active || !playing || paused || !data.size()) + if (!active || !playing || !data.size()) return 0; /* @@ -490,6 +490,8 @@ AudioStreamPlaybackSpeex::AudioStreamPlaybackSpeex() { stream_channels=1; stream_srate=1; stream_minbuff_size=1; + playing=false; + } -- cgit v1.2.3