mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
modules: don't unload module on stream error
Unloading the module on stream errors is a bit too much because a suspend can clear the stream error again (or the error might not be fatal) This can happen for example when negotiation fails on some stream ports (wireplumber tries to link the midi ports to audio ports) and it's better to not completely fail on that. Fixes #4121
This commit is contained in:
parent
32e4553a05
commit
280bbd88d4
4 changed files with 9 additions and 3 deletions
|
|
@ -548,8 +548,8 @@ static void stream_state_changed(void *d, enum pw_filter_state old,
|
|||
struct impl *impl = s->impl;
|
||||
switch (state) {
|
||||
case PW_FILTER_STATE_ERROR:
|
||||
pw_log_error("filter state %d error: %s", state, error);
|
||||
SPA_FALLTHROUGH;
|
||||
pw_log_warn("filter state %d error: %s", state, error);
|
||||
break;
|
||||
case PW_FILTER_STATE_UNCONNECTED:
|
||||
pw_impl_module_schedule_destroy(impl->module);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -306,10 +306,12 @@ static void stream_state_changed(void *d, enum pw_filter_state old,
|
|||
struct stream *s = d;
|
||||
struct impl *impl = s->impl;
|
||||
switch (state) {
|
||||
case PW_FILTER_STATE_ERROR:
|
||||
case PW_FILTER_STATE_UNCONNECTED:
|
||||
pw_impl_module_schedule_destroy(impl->module);
|
||||
break;
|
||||
case PW_FILTER_STATE_ERROR:
|
||||
pw_log_warn("stream %p: error: %s", s, error);
|
||||
break;
|
||||
case PW_FILTER_STATE_PAUSED:
|
||||
s->running = false;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -274,6 +274,8 @@ static void stream_state_changed(void *d, enum pw_filter_state old,
|
|||
struct impl *impl = s->impl;
|
||||
switch (state) {
|
||||
case PW_FILTER_STATE_ERROR:
|
||||
pw_log_warn("stream %s: error: %s", s, error);
|
||||
break;
|
||||
case PW_FILTER_STATE_UNCONNECTED:
|
||||
pw_impl_module_schedule_destroy(impl->module);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -297,6 +297,8 @@ static void stream_state_changed(void *d, enum pw_filter_state old,
|
|||
struct impl *impl = s->impl;
|
||||
switch (state) {
|
||||
case PW_FILTER_STATE_ERROR:
|
||||
pw_log_warn("stream %s: error: %s", s, error);
|
||||
break;
|
||||
case PW_FILTER_STATE_UNCONNECTED:
|
||||
pw_impl_module_schedule_destroy(impl->module);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue