From b0705a89b01d0e81663f06849bda849f11983a07 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 8 Jan 2020 13:22:23 +0100 Subject: [PATCH] filter: handle NULL param --- src/pipewire/filter.c | 4 ++-- src/pipewire/stream.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pipewire/filter.c b/src/pipewire/filter.c index d7f570772..6ebcc45db 100644 --- a/src/pipewire/filter.c +++ b/src/pipewire/filter.c @@ -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, ¶m, 1)) < 0) + if ((res = update_params(impl, port, id, ¶m, param ? 1 : 0)) < 0) return res; pw_filter_emit_param_changed(filter, port->user_data, id, param); diff --git a/src/pipewire/stream.c b/src/pipewire/stream.c index da3e74b32..16372aeff 100644 --- a/src/pipewire/stream.c +++ b/src/pipewire/stream.c @@ -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, ¶m, 1)) < 0) + if ((res = update_params(impl, id, ¶m, param ? 1 : 0)) < 0) return res; pw_stream_emit_param_changed(stream, id, param);