mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
module-echo-cancel: null check playback stream
Protect against segfault when monitor.mode = true and playback stream isn't created.
This commit is contained in:
parent
943f40fd3a
commit
0d0af4c9d8
1 changed files with 4 additions and 2 deletions
|
|
@ -666,7 +666,8 @@ static void input_param_changed(void *data, uint32_t id, const struct spa_pod* p
|
||||||
params[0] = get_props_param(impl, &b.b);
|
params[0] = get_props_param(impl, &b.b);
|
||||||
if (params[0]) {
|
if (params[0]) {
|
||||||
pw_stream_update_params(impl->capture, params, 1);
|
pw_stream_update_params(impl->capture, params, 1);
|
||||||
pw_stream_update_params(impl->playback, params, 1);
|
if (impl->playback != NULL)
|
||||||
|
pw_stream_update_params(impl->playback, params, 1);
|
||||||
}
|
}
|
||||||
spa_pod_dynamic_builder_clean(&b);
|
spa_pod_dynamic_builder_clean(&b);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -767,7 +768,8 @@ static void output_param_changed(void *data, uint32_t id, const struct spa_pod *
|
||||||
params[0] = get_props_param(impl, &b.b);
|
params[0] = get_props_param(impl, &b.b);
|
||||||
if (params[0] != NULL) {
|
if (params[0] != NULL) {
|
||||||
pw_stream_update_params(impl->capture, params, 1);
|
pw_stream_update_params(impl->capture, params, 1);
|
||||||
pw_stream_update_params(impl->playback, params, 1);
|
if (impl->playback != NULL)
|
||||||
|
pw_stream_update_params(impl->playback, params, 1);
|
||||||
}
|
}
|
||||||
spa_pod_dynamic_builder_clean(&b);
|
spa_pod_dynamic_builder_clean(&b);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue