stream: don't change to the error state on proxy errors

The proxy errors are really from the session manager informing us about
decisions it made (failure to link, etc). The state of the stream is not
really affected by this so just emit the error signal and let the app
decide what to do.
This commit is contained in:
Wim Taymans 2021-10-14 16:00:40 +02:00
parent 8c346ab3a7
commit 1f5396fedb
2 changed files with 10 additions and 2 deletions

View file

@ -1144,7 +1144,11 @@ static void proxy_destroy(void *_data)
static void proxy_error(void *_data, int seq, int res, const char *message)
{
struct pw_filter *filter = _data;
filter_set_state(filter, PW_FILTER_STATE_ERROR, message);
/* we just emit the state change here to inform the application.
* If this is supposed to be a permanent error, the app should
* do a pw_stream_set_error() */
pw_filter_emit_state_changed(filter, filter->state,
PW_FILTER_STATE_ERROR, message);
}
static void proxy_bound(void *_data, uint32_t global_id)

View file

@ -1014,7 +1014,11 @@ static void proxy_destroy(void *_data)
static void proxy_error(void *_data, int seq, int res, const char *message)
{
struct pw_stream *stream = _data;
stream_set_state(stream, PW_STREAM_STATE_ERROR, message);
/* we just emit the state change here to inform the application.
* If this is supposed to be a permanent error, the app should
* do a pw_stream_set_error() */
pw_stream_emit_state_changed(stream, stream->state,
PW_STREAM_STATE_ERROR, message);
}
static void proxy_bound(void *data, uint32_t global_id)