summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcg <cg@FreeBSD.org>2001-04-08 20:14:14 +0000
committercg <cg@FreeBSD.org>2001-04-08 20:14:14 +0000
commitd51c99ac75e43f62b30f2a2265e96081da4d5a06 (patch)
tree949f3f530d06fc0ed81acc75da86283d174a05f4
parentc818630db2753ad55f201889dba54d20097d64bd (diff)
downloadFreeBSD-src-d51c99ac75e43f62b30f2a2265e96081da4d5a06.zip
FreeBSD-src-d51c99ac75e43f62b30f2a2265e96081da4d5a06.tar.gz
if the feeder chain returned no data, do not try to acquire the data.
-rw-r--r--sys/dev/sound/pcm/buffer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/sound/pcm/buffer.c b/sys/dev/sound/pcm/buffer.c
index 1480c95..ddc3219 100644
--- a/sys/dev/sound/pcm/buffer.c
+++ b/sys/dev/sound/pcm/buffer.c
@@ -514,7 +514,8 @@ sndbuf_feed(struct snd_dbuf *from, struct snd_dbuf *to, struct pcm_channel *chan
return EINVAL;
count = FEEDER_FEED(feeder, channel, to->tmpbuf, count, from);
- sndbuf_acquire(to, to->tmpbuf, count);
+ if (count)
+ sndbuf_acquire(to, to->tmpbuf, count);
/* the root feeder has called sndbuf_dispose(from, , bytes fetched) */
return 0;
OpenPOWER on IntegriCloud