summaryrefslogtreecommitdiffstats
path: root/src/utils/padsp.c
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2006-06-16 21:08:35 +0000
committerPierre Ossman <ossman@cendio.se>2006-06-16 21:08:35 +0000
commite66b0e6d3f235a65913c17a549bed74fd414445a (patch)
tree9b5e56cb937042da57426371326a8debd0cc104a /src/utils/padsp.c
parent6684264b69a17ec907c903c6f9ca9b99dbd29be2 (diff)
Creating a stream might take some time, so check that it's in the right state
before transferring data. git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1022 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/utils/padsp.c')
-rw-r--r--src/utils/padsp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utils/padsp.c b/src/utils/padsp.c
index b0e76327..be935060 100644
--- a/src/utils/padsp.c
+++ b/src/utils/padsp.c
@@ -767,7 +767,7 @@ static int fd_info_copy_data(fd_info *i, int force) {
flags = 0;
- if (i->play_stream) {
+ if ((i->play_stream) && (pa_stream_get_state(i->play_stream) == PA_STREAM_READY)) {
n = pa_stream_writable_size(i->play_stream);
if (n == (size_t)-1) {
@@ -810,7 +810,7 @@ static int fd_info_copy_data(fd_info *i, int force) {
flags |= PA_IO_EVENT_INPUT;
}
- if (i->rec_stream) {
+ if ((i->rec_stream) && (pa_stream_get_state(i->rec_stream) == PA_STREAM_READY)) {
n = pa_stream_readable_size(i->rec_stream);
if (n == (size_t)-1) {