mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-04 13:30:08 -05:00
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 <afenkart@gmx.ch>
This commit is contained in:
parent
457b8777ab
commit
0ed778404d
1 changed files with 1 additions and 4 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue