From: Abramo Bagnara Date: Sun, 16 Jul 2000 11:29:33 +0000 (+0000) Subject: Fixed ignoring error X-Git-Tag: v1.0.3~1198 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=73a9e4c943c6b0d3d8ce031f6c24c763b8b05855;p=alsa-lib.git Fixed ignoring error --- diff --git a/src/pcm/plugin/mmap.c b/src/pcm/plugin/mmap.c index 7b75aa8c..177e04fb 100644 --- a/src/pcm/plugin/mmap.c +++ b/src/pcm/plugin/mmap.c @@ -188,7 +188,9 @@ static ssize_t mmap_playback_transfer(snd_pcm_plugin_t *plugin, } #endif - snd_pcm_frame_data(stream, frames); + err = snd_pcm_mmap_frame_data(stream, frames); + if (err < 0) + return err; if (snd_pcm_mmap_state(stream) == SND_PCM_STATE_PREPARED && (setup->start_mode == SND_PCM_START_DATA || (setup->start_mode == SND_PCM_START_FULL && @@ -207,13 +209,16 @@ static ssize_t mmap_capture_transfer(snd_pcm_plugin_t *plugin, { mmap_t *data; snd_pcm_t *stream; + int err; assert(plugin && plugin->next); data = (mmap_t *)plugin->extra_data; stream = plugin->plug->slave; /* FIXME: not here the increment */ - snd_pcm_frame_data(stream, frames); + err = snd_pcm_mmap_frame_data(stream, frames); + if (err < 0) + return err; return frames; }