summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wtaymans@redhat.com>2020-08-04 18:13:37 +0200
committerWim Taymans <wtaymans@redhat.com>2020-08-04 18:13:37 +0200
commit979fec288e2c02ab71bb802460bc1c835c0e5910 (patch)
tree4267f6011f48b14683679b92444fe73ad55f7c7e
parent94c23b7ed1c7164618c965ae455330aff9109ef5 (diff)
stream: let the operation emit the TERMINATED state
When we disconnect, let the operation emit the TERMINATED state because some apps expect this state to be emited asynchronously. Makes GStreamer pulsesink work. Fixes #210
-rw-r--r--pipewire-pulseaudio/src/stream.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/pipewire-pulseaudio/src/stream.c b/pipewire-pulseaudio/src/stream.c
index d44e00c6..2bf351de 100644
--- a/pipewire-pulseaudio/src/stream.c
+++ b/pipewire-pulseaudio/src/stream.c
@@ -112,8 +112,6 @@ static void stream_state_changed(void *data, enum pw_stream_state old,
if (!s->disconnecting) {
pa_context_set_error(c, PA_ERR_KILLED);
pa_stream_set_state(s, PA_STREAM_FAILED);
- } else {
- pa_stream_set_state(s, PA_STREAM_TERMINATED);
}
break;
case PW_STREAM_STATE_CONNECTING:
@@ -1020,6 +1018,7 @@ int pa_stream_connect_record(
static void on_disconnected(pa_operation *o, void *userdata)
{
pa_stream *s = o->stream;
+ pw_log_debug("stream %p", s);
pa_stream_set_state(s, PA_STREAM_TERMINATED);
}