From: Andreas Fenkart Date: Mon, 22 Nov 2004 06:40:10 +0000 (+0000) Subject: Fixes variable shadow problem in capture direction X-Git-Tag: v1.0.8~31 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=0ed778404d0b8d9ef9c86454e146e9db83d9a526;p=alsa-lib.git Fixes variable shadow problem in capture direction My gnomemeeting hung when accessing the microphone. The problem was that the rate variable was not initialized when jumping to the __partial label. Signed-off-by: Andreas Fenkart --- diff --git a/src/pcm/pcm_rate.c b/src/pcm/pcm_rate.c index 27fe4aa5..605cb49f 100644 --- a/src/pcm/pcm_rate.c +++ b/src/pcm/pcm_rate.c @@ -1068,7 +1068,7 @@ static int snd_pcm_rate_grab_next_period(snd_pcm_t *pcm, snd_pcm_uframes_t hw_of snd_pcm_uframes_t cont = pcm->buffer_size - hw_offset; const snd_pcm_channel_area_t *areas; const snd_pcm_channel_area_t *slave_areas; - snd_pcm_uframes_t slave_offset; + snd_pcm_uframes_t slave_offset, xfer; snd_pcm_uframes_t slave_frames = ULONG_MAX; snd_pcm_sframes_t result; @@ -1091,9 +1091,6 @@ static int snd_pcm_rate_grab_next_period(snd_pcm_t *pcm, snd_pcm_uframes_t hw_of return 0; } } else { - snd_pcm_rate_t *rate = pcm->private_data; - snd_pcm_uframes_t xfer; - /* ok, grab first fragment */ result = snd_pcm_mmap_begin(rate->slave, &slave_areas, &slave_offset, &slave_frames); if (result < 0)