mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-09 13:30:06 -05:00
filter: handle NULL param
This commit is contained in:
parent
aa36a72427
commit
b0705a89b0
2 changed files with 4 additions and 4 deletions
|
|
@ -517,10 +517,10 @@ static int port_set_param(struct filter *impl, struct port *port,
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
pw_log_debug(NAME" %p: param changed: %p %d", impl, param, impl->disconnecting);
|
pw_log_debug(NAME" %p: param changed: %p %d", impl, param, impl->disconnecting);
|
||||||
if (pw_log_level_enabled(SPA_LOG_LEVEL_DEBUG))
|
if (param && pw_log_level_enabled(SPA_LOG_LEVEL_DEBUG))
|
||||||
spa_debug_pod(2, NULL, param);
|
spa_debug_pod(2, NULL, param);
|
||||||
|
|
||||||
if ((res = update_params(impl, port, id, ¶m, 1)) < 0)
|
if ((res = update_params(impl, port, id, ¶m, param ? 1 : 0)) < 0)
|
||||||
return res;
|
return res;
|
||||||
|
|
||||||
pw_filter_emit_param_changed(filter, port->user_data, id, param);
|
pw_filter_emit_param_changed(filter, port->user_data, id, param);
|
||||||
|
|
|
||||||
|
|
@ -518,10 +518,10 @@ static int impl_port_set_param(void *object,
|
||||||
return param == NULL ? 0 : -EIO;
|
return param == NULL ? 0 : -EIO;
|
||||||
|
|
||||||
pw_log_debug(NAME" %p: param changed: %p %d", impl, param, impl->disconnecting);
|
pw_log_debug(NAME" %p: param changed: %p %d", impl, param, impl->disconnecting);
|
||||||
if (pw_log_level_enabled(SPA_LOG_LEVEL_DEBUG))
|
if (param && pw_log_level_enabled(SPA_LOG_LEVEL_DEBUG))
|
||||||
spa_debug_pod(2, NULL, param);
|
spa_debug_pod(2, NULL, param);
|
||||||
|
|
||||||
if ((res = update_params(impl, id, ¶m, 1)) < 0)
|
if ((res = update_params(impl, id, ¶m, param ? 1 : 0)) < 0)
|
||||||
return res;
|
return res;
|
||||||
|
|
||||||
pw_stream_emit_param_changed(stream, id, param);
|
pw_stream_emit_param_changed(stream, id, param);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue