diff --git a/rdpsnd_libao.c b/rdpsnd_libao.c index 22c03c9..3744073 100644 --- a/rdpsnd_libao.c +++ b/rdpsnd_libao.c @@ -42,7 +42,8 @@ void libao_add_fds(int *n, fd_set * rfds, fd_set * wfds, struct timeval *tv) { /* We need to be called rather often... */ - FD_SET(0, wfds); + if (o_device != NULL && !rdpsnd_queue_empty()) + FD_SET(0, wfds); } void diff --git a/rdpsnd_sgi.c b/rdpsnd_sgi.c index 7903391..94f5836 100644 --- a/rdpsnd_sgi.c +++ b/rdpsnd_sgi.c @@ -45,7 +45,8 @@ void sgi_add_fds(int *n, fd_set * rfds, fd_set * wfds, struct timeval *tv) { /* We need to be called rather often... */ - FD_SET(0, wfds); + if (output_port != (ALport) 0 && !rdpsnd_queue_empty()) + FD_SET(0, wfds); } void