mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-31 22:25:35 -04:00
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.
This commit is contained in:
parent
bf174b7046
commit
eccc92a34d
29 changed files with 127 additions and 36 deletions
|
|
@ -847,7 +847,10 @@ int snd_pcm_dmix_open(snd_pcm_t **pcmp, const char *name,
|
|||
dmix->sync_ptr = snd_pcm_dmix_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;
|
||||
|
|
@ -1124,7 +1127,7 @@ int _snd_pcm_dmix_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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue