Fixed uninitialized variable which could definitely have caused problems.
authorSam Lantinga <slouken@libsdl.org>
Tue, 13 Apr 2010 22:28:38 -0700
changeset 487485a29de2b2d
parent 486 6e823c27bfea
child 488 94b190330355
Fixed uninitialized variable which could definitely have caused problems.
music_flac.c
     1.1 --- a/music_flac.c	Sat Feb 27 10:18:25 2010 +0000
     1.2 +++ b/music_flac.c	Tue Apr 13 22:28:38 2010 -0700
     1.3 @@ -405,7 +405,6 @@
     1.4  /* Read some FLAC stream data and convert it for output */
     1.5  static void FLAC_getsome(FLAC_music *music)
     1.6  {
     1.7 -	int section;
     1.8  	SDL_AudioCVT *cvt;
     1.9  
    1.10  	/* GET AUDIO wAVE DATA */
    1.11 @@ -475,7 +474,7 @@
    1.12  		return;
    1.13  	}
    1.14  	cvt = &music->cvt;
    1.15 -	if (section != music->section) {
    1.16 +	if (music->section < 0) {
    1.17  
    1.18  		SDL_BuildAudioCVT (cvt, AUDIO_S16, (Uint8)music->flac_data.channels,
    1.19  						(int)music->flac_data.sample_rate, mixer.format,
    1.20 @@ -484,7 +483,7 @@
    1.21  			free (cvt->buf);
    1.22  		}
    1.23  		cvt->buf = (Uint8 *)malloc (music->flac_data.data_len * cvt->len_mult);
    1.24 -		music->section = section;
    1.25 +		music->section = 0;
    1.26  	}
    1.27  	if (cvt->buf) {
    1.28  		memcpy (cvt->buf, music->flac_data.data, music->flac_data.data_read);