mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-05 13:30:02 -05:00
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
This commit is contained in:
parent
94c23b7ed1
commit
979fec288e
1 changed files with 1 additions and 2 deletions
|
|
@ -112,8 +112,6 @@ static void stream_state_changed(void *data, enum pw_stream_state old,
|
||||||
if (!s->disconnecting) {
|
if (!s->disconnecting) {
|
||||||
pa_context_set_error(c, PA_ERR_KILLED);
|
pa_context_set_error(c, PA_ERR_KILLED);
|
||||||
pa_stream_set_state(s, PA_STREAM_FAILED);
|
pa_stream_set_state(s, PA_STREAM_FAILED);
|
||||||
} else {
|
|
||||||
pa_stream_set_state(s, PA_STREAM_TERMINATED);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PW_STREAM_STATE_CONNECTING:
|
case PW_STREAM_STATE_CONNECTING:
|
||||||
|
|
@ -1020,6 +1018,7 @@ int pa_stream_connect_record(
|
||||||
static void on_disconnected(pa_operation *o, void *userdata)
|
static void on_disconnected(pa_operation *o, void *userdata)
|
||||||
{
|
{
|
||||||
pa_stream *s = o->stream;
|
pa_stream *s = o->stream;
|
||||||
|
pw_log_debug("stream %p", s);
|
||||||
pa_stream_set_state(s, PA_STREAM_TERMINATED);
|
pa_stream_set_state(s, PA_STREAM_TERMINATED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue