mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
pulse: wait for READY before calling callbacks
This commit is contained in:
parent
e030445e49
commit
2991a814cd
2 changed files with 4 additions and 4 deletions
|
|
@ -554,13 +554,13 @@ static void stream_process(void *data)
|
|||
if (s->direction == PA_STREAM_PLAYBACK) {
|
||||
queue_output(s);
|
||||
|
||||
if (s->write_callback)
|
||||
if (s->write_callback && s->state == PA_STREAM_READY)
|
||||
s->write_callback(s, s->maxblock, s->write_userdata);
|
||||
}
|
||||
else {
|
||||
pull_input(s);
|
||||
|
||||
if (s->read_callback && s->ready_bytes > 0)
|
||||
if (s->read_callback && s->ready_bytes > 0 && s->state == PA_STREAM_READY)
|
||||
s->read_callback(s, s->ready_bytes, s->read_userdata);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue