mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-01 22:58:49 -04:00
Better handling of odd situations
This commit is contained in:
parent
3031f2c48f
commit
3c9755bb7e
1 changed files with 2 additions and 2 deletions
|
|
@ -76,7 +76,7 @@ static ssize_t mmap_src_channels(snd_pcm_plugin_t *plugin,
|
||||||
ready = poll(&pfd, 1, 10000);
|
ready = poll(&pfd, 1, 10000);
|
||||||
if (ready < 0)
|
if (ready < 0)
|
||||||
return ready;
|
return ready;
|
||||||
if (ready && pfd.revents & POLLERR)
|
if (ready == 0 || (pfd.revents & POLLERR))
|
||||||
return -EPIPE;
|
return -EPIPE;
|
||||||
assert(snd_pcm_mmap_ready(stream));
|
assert(snd_pcm_mmap_ready(stream));
|
||||||
}
|
}
|
||||||
|
|
@ -143,7 +143,7 @@ static ssize_t mmap_dst_channels(snd_pcm_plugin_t *plugin,
|
||||||
ready = poll(&pfd, 1, 10000);
|
ready = poll(&pfd, 1, 10000);
|
||||||
if (ready < 0)
|
if (ready < 0)
|
||||||
return ready;
|
return ready;
|
||||||
if (ready && pfd.revents & POLLERR)
|
if (ready == 0 || (pfd.revents & POLLERR))
|
||||||
return -EPIPE;
|
return -EPIPE;
|
||||||
assert(snd_pcm_mmap_ready(stream));
|
assert(snd_pcm_mmap_ready(stream));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue