diff options
author | Ricardo Biehl Pasquali <pasqualirb@gmail.com> | 2019-01-07 19:33:13 -0200 |
---|---|---|
committer | Ricardo Biehl Pasquali <pasqualirb@gmail.com> | 2019-01-08 13:06:18 -0200 |
commit | f85cf62763b170698a91a7dd176695b581dbe358 (patch) | |
tree | cc0529c09bb414669ce3cdd6aa8a932fd7df5f21 | |
parent | 5f247ef8d5ef39922dde2e2f12c7a2ab7393d34b (diff) |
pcm: Prepare after overrun
Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
-rw-r--r-- | src/pcm.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -760,6 +760,10 @@ int pcm_readi(struct pcm *pcm, void *data, unsigned int frame_count) if (errno == EPIPE) { /* we failed to make our window -- try to restart */ pcm->underruns++; + if (pcm->flags & PCM_NORESTART) + return -EPIPE; + if (pcm_prepare(pcm)) + return -EPIPE; continue; } return oops(pcm, errno, "cannot read stream data"); |