mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
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
This commit is contained in:
parent
6684264b69
commit
e66b0e6d3f
1 changed files with 2 additions and 2 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue