summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2007-09-28 12:22:56 +0000
committerLennart Poettering <lennart@poettering.net>2007-09-28 12:22:56 +0000
commitdf33b4c7b339a1c26ccbfd80e5b91637c177b378 (patch)
tree18b308613581b98bc84064e11f76646ec2791ff7
parent6d8aea724eb0011a068c9c883450418c80fda777 (diff)
only do IO if we are RUNNING or IDLE, but not when we are in INIT
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1912 fefdeb5f-60dc-0310-8127-8f9354f1896f
-rw-r--r--src/modules/module-oss.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/module-oss.c b/src/modules/module-oss.c
index 8d088997..82b5b6ce 100644
--- a/src/modules/module-oss.c
+++ b/src/modules/module-oss.c
@@ -849,7 +849,7 @@ static void thread_func(void *userdata) {
/* Render some data and write it to the dsp */
- if (u->sink && u->sink->thread_info.state != PA_SINK_UNLINKED && u->fd >= 0 && (revents & POLLOUT)) {
+ if (u->sink && PA_SINK_OPENED(u->sink->thread_info.state) && (revents & POLLOUT)) {
if (u->use_mmap) {
@@ -939,7 +939,7 @@ static void thread_func(void *userdata) {
/* Try to read some data and pass it on to the source driver */
- if (u->source && u->source->thread_info.state != PA_SOURCE_UNLINKED && u->fd >= 0 && ((revents & POLLIN))) {
+ if (u->source && PA_SOURCE_OPENED(u->source->thread_info.state) && ((revents & POLLIN))) {
if (u->use_mmap) {