filter: handle NULL param

This commit is contained in:
Wim Taymans 2020-01-08 13:22:23 +01:00
parent aa36a72427
commit b0705a89b0
2 changed files with 4 additions and 4 deletions

View file

@ -517,10 +517,10 @@ static int port_set_param(struct filter *impl, struct port *port,
int res;
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);
if ((res = update_params(impl, port, id, &param, 1)) < 0)
if ((res = update_params(impl, port, id, &param, param ? 1 : 0)) < 0)
return res;
pw_filter_emit_param_changed(filter, port->user_data, id, param);

View file

@ -518,10 +518,10 @@ static int impl_port_set_param(void *object,
return param == NULL ? 0 : -EIO;
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);
if ((res = update_params(impl, id, &param, 1)) < 0)
if ((res = update_params(impl, id, &param, param ? 1 : 0)) < 0)
return res;
pw_stream_emit_param_changed(stream, id, param);