From: Abramo Bagnara Date: Sat, 30 Jun 2001 08:24:41 +0000 (+0000) Subject: Fixed missing frames count initialization X-Git-Tag: v1.0.3~762 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=c51095434d6f9310ab530de85ea97dba94b25b08;p=alsa-lib.git Fixed missing frames count initialization --- diff --git a/src/pcm/pcm_plugin.c b/src/pcm/pcm_plugin.c index a6674abb..0db059a2 100644 --- a/src/pcm/pcm_plugin.c +++ b/src/pcm/pcm_plugin.c @@ -202,7 +202,8 @@ static snd_pcm_uframes_t snd_pcm_plugin_write_areas(snd_pcm_t *pcm, while (size > 0) { snd_pcm_uframes_t frames = size; const snd_pcm_channel_area_t *slave_areas; - snd_pcm_uframes_t slave_offset, slave_frames; + snd_pcm_uframes_t slave_offset; + snd_pcm_uframes_t slave_frames = ULONG_MAX; snd_pcm_mmap_begin(slave, &slave_areas, &slave_offset, &slave_frames); frames = plugin->write(pcm, areas, offset, frames, slave_areas, slave_offset, &slave_frames); @@ -229,7 +230,8 @@ static snd_pcm_uframes_t snd_pcm_plugin_read_areas(snd_pcm_t *pcm, while (size > 0) { snd_pcm_uframes_t frames = size; const snd_pcm_channel_area_t *slave_areas; - snd_pcm_uframes_t slave_offset, slave_frames; + snd_pcm_uframes_t slave_offset; + snd_pcm_uframes_t slave_frames = ULONG_MAX; snd_pcm_mmap_begin(slave, &slave_areas, &slave_offset, &slave_frames); frames = plugin->read(pcm, areas, offset, frames, slave_areas, slave_offset, &slave_frames); @@ -303,7 +305,8 @@ snd_pcm_sframes_t snd_pcm_plugin_mmap_commit(snd_pcm_t *pcm, snd_pcm_uframes_t frames = size; snd_pcm_uframes_t cont = pcm->buffer_size - hw_offset; const snd_pcm_channel_area_t *slave_areas; - snd_pcm_uframes_t slave_offset, slave_frames; + snd_pcm_uframes_t slave_offset; + snd_pcm_uframes_t slave_frames = ULONG_MAX; snd_pcm_mmap_begin(slave, &slave_areas, &slave_offset, &slave_frames); if (frames > cont) frames = cont; @@ -349,7 +352,8 @@ snd_pcm_sframes_t snd_pcm_plugin_avail_update(snd_pcm_t *pcm) snd_pcm_uframes_t frames = size; snd_pcm_uframes_t cont = pcm->buffer_size - hw_offset; const snd_pcm_channel_area_t *slave_areas; - snd_pcm_uframes_t slave_offset, slave_frames; + snd_pcm_uframes_t slave_offset; + snd_pcm_uframes_t slave_frames = ULONG_MAX; snd_pcm_mmap_begin(slave, &slave_areas, &slave_offset, &slave_frames); if (frames > cont) frames = cont;