diff options
author | Takashi Iwai <tiwai@suse.de> | 2006-01-30 14:41:51 +0000 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2006-01-30 14:41:51 +0000 |
commit | eccc92a34d4809cd5926fa054ff7d231ae890c5e (patch) | |
tree | c1ffe2230bb76cf179da60f3052c62eac6619590 /src/pcm/pcm_dsnoop.c | |
parent | bf174b704636cc4a3e1d8d6a8e9261957d1386f0 (diff) | |
download | alsa-lib-eccc92a34d4809cd5926fa054ff7d231ae890c5e.tar.gz |
Fix infinite parse of recursive definitions
Fixed the infinite parse (and eventually segfault) of recursive definitions.
Also fixed the parse of a string slave PCM of direct plugins.
Diffstat (limited to 'src/pcm/pcm_dsnoop.c')
-rw-r--r-- | src/pcm/pcm_dsnoop.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/pcm/pcm_dsnoop.c b/src/pcm/pcm_dsnoop.c index 6fe1bd52..e2b91bbe 100644 --- a/src/pcm/pcm_dsnoop.c +++ b/src/pcm/pcm_dsnoop.c @@ -554,7 +554,10 @@ int snd_pcm_dsnoop_open(snd_pcm_t **pcmp, const char *name, dsnoop->sync_ptr = snd_pcm_dsnoop_sync_ptr; if (first_instance) { - ret = snd_pcm_open_slave(&spcm, root, sconf, stream, mode | SND_PCM_NONBLOCK); + /* recursion is already checked in + snd_pcm_direct_get_slave_ipc_offset() */ + ret = snd_pcm_open_slave(&spcm, root, sconf, stream, + mode | SND_PCM_NONBLOCK, NULL); if (ret < 0) { SNDERR("unable to open slave"); goto _err; @@ -745,7 +748,7 @@ int _snd_pcm_dsnoop_open(snd_pcm_t **pcmp, const char *name, params.period_size = psize; params.buffer_size = bsize; - ipc_offset = snd_pcm_direct_get_slave_ipc_offset(sconf, stream); + ipc_offset = snd_pcm_direct_get_slave_ipc_offset(root, sconf, stream); if (ipc_offset < 0) { snd_config_delete(sconf); return ipc_offset; |