From f85cf62763b170698a91a7dd176695b581dbe358 Mon Sep 17 00:00:00 2001 From: Ricardo Biehl Pasquali Date: Mon, 7 Jan 2019 19:33:13 -0200 Subject: pcm: Prepare after overrun Signed-off-by: Ricardo Biehl Pasquali --- src/pcm.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pcm.c b/src/pcm.c index 7dec5f7..b02883f 100644 --- a/src/pcm.c +++ b/src/pcm.c @@ -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"); -- cgit v1.2.3